Sha256: c485711880dadece5b3f33bcf166b04e21d0fa99c33a7e94c28f91afb3c6247d
Contents?: true
Size: 438 Bytes
Versions: 21
Compression:
Stored size: 438 Bytes
Contents
unless Proc.method_defined?(:<<) || Proc.method_defined?(:>>) class Proc def <<(g) if lambda? lambda { |*args, &blk| call(g.call(*args, &blk)) } else proc { |*args, &blk| call(g.call(*args, &blk)) } end end def >>(g) if lambda? lambda { |*args, &blk| g.call(call(*args, &blk)) } else proc { |*args, &blk| g.call(call(*args, &blk)) } end end end end
Version data entries
21 entries across 21 versions & 2 rubygems