summaryrefslogtreecommitdiff
path: root/ext/fiddle/lib
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-02-26 10:06:30 -0800
committerAaron Patterson <tenderlove@ruby-lang.org>2021-02-26 10:06:56 -0800
commitd45466dc5b9b45d5b78d161fc86265e6e19d6e1e (patch)
treee27eb3ec290f92733c27078805f2a44fe723c21a /ext/fiddle/lib
parent3d8e373a588bca976f7f1a8172b5b1b27d78f60f (diff)
Oops! Add another test and fix to_proc implementation
Diffstat (limited to 'ext/fiddle/lib')
-rw-r--r--ext/fiddle/lib/fiddle/function.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/fiddle/lib/fiddle/function.rb b/ext/fiddle/lib/fiddle/function.rb
index f9910a0524..dc2e3e6bf5 100644
--- a/ext/fiddle/lib/fiddle/function.rb
+++ b/ext/fiddle/lib/fiddle/function.rb
@@ -22,7 +22,8 @@ module Fiddle
# Turn this function in to a proc
def to_proc
- lambda { |*args| self.call(*args) }
+ this = self
+ lambda { |*args| this.call(*args) }
end
end
end