diff options
author | Chris Seaton <chris.seaton@shopify.com> | 2020-10-05 23:51:34 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2020-10-06 15:41:47 -0700 |
commit | fef52122b0c0dfabf947c3f016334b84a9eeb903 (patch) | |
tree | e7a6b32caf994198606baeb858d39be48abd26dc /proc.c | |
parent | ee7cc6ac35cfb056b3946b1dcd6d4d5a140ccacf (diff) |
Use proc_binding rather than rb_funcall
FIX
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3629
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -48,6 +48,7 @@ VALUE rb_cProc; static rb_block_call_func bmcall; static int method_arity(VALUE); static int method_min_max_arity(VALUE, int *max); +static VALUE proc_binding(VALUE self); #define attached id__attached__ @@ -2743,7 +2744,7 @@ VALUE rb_callable_receiver(VALUE callable) { if (rb_obj_is_proc(callable)) { - VALUE binding = rb_funcall(callable, rb_intern("binding"), 0); + VALUE binding = proc_binding(callable); return rb_funcall(binding, rb_intern("receiver"), 0); } else if (rb_obj_is_method(callable)) { |