Sha256: 14da6d684eb2c3a985729e20863977a9886fac8177bd3213b9f1e296c791ec85
Contents?: true
Size: 322 Bytes
Versions: 11
Compression:
Stored size: 322 Bytes
Contents
class Proc # @note Converting {Proc} to {Lambda} may have incorrect behaviours on corner cases. # @note See {Ruby Language Issues}[https://bugs.ruby-lang.org/issues/7314] for more details. def to_lambda (instance = Object.new) instance.define_singleton_method(:_, &self) instance.method(:_).to_proc end end
Version data entries
11 entries across 11 versions & 1 rubygems