lib/procemon/function/meta/inject_methods.rb in procemon-0.0.3 vs lib/procemon/function/meta/inject_methods.rb in procemon-0.0.4

- old
+ new

@@ -19,18 +19,18 @@ define_singleton_method method do |*arguments| case true when options == :before begin - block.call *arguments + block.call_with_binding self.get_binding, *arguments original_method.call *arguments end when options == :after begin original_method.call *arguments - block.call *arguments + block.call_with_binding self.get_binding, *arguments end end end end @@ -53,17 +53,17 @@ case true when options == :before begin - block.call *args + block.call_with_binding self.get_binding, *args self.__send__ :"old_#{method.to_s}", *args end when options == :after begin self.__send__ :"old_#{method.to_s}", *args - block.call *args + block.call_with_binding self.get_binding, *args end end end \ No newline at end of file