lib/fiddle/function.rb in fiddle-1.0.8 vs lib/fiddle/function.rb in fiddle-1.0.9

- old
+ new

@@ -17,7 +17,13 @@ # The integer memory location of this function def to_i ptr.to_i end + + # Turn this function in to a proc + def to_proc + this = self + lambda { |*args| this.call(*args) } + end end end