lib/moosex.rb in moosex-0.0.12 vs lib/moosex.rb in moosex-0.0.13
- old
+ new
@@ -141,12 +141,16 @@
end
def around(method_name, &block)
method = instance_method method_name
+ code = Proc.new do | o, *a|
+ method.bind(o).call(*a)
+ end
+
define_method method_name do |*args|
- block.call(method, self,*args)
+ block.call(code, self,*args)
end
# __meta.add_around(method, block)
end
\ No newline at end of file