lib/mpatch/proc.rb in mpatch-2.3.0 vs lib/mpatch/proc.rb in mpatch-2.4.0

- old
+ new

@@ -1,14 +1,23 @@ -module MPatch::Include - module Proc +module MPatch - # sugar syntax for proc * operator - # a = ->(x){x+1} - # b = ->(x){x*10} - # c = b*a - # c.call(1) #=> 20 - def *(other) - self.class.new { |*args| self[*other[*args]] } + module Include + + module Proc + + # sugar syntax for proc * operator + # a = ->(x){x+1} + # b = ->(x){x*10} + # c = b*a + # c.call(1) #=> 20 + def *(other) + self.class.new { |*args| self[*other[*args]] } + end + end end + + require File.join 'mpatch','injector' + + end