From fef52122b0c0dfabf947c3f016334b84a9eeb903 Mon Sep 17 00:00:00 2001 From: Chris Seaton Date: Mon, 5 Oct 2020 23:51:34 +0100 Subject: Use proc_binding rather than rb_funcall FIX --- proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index b6285b18c2..061c6c34a6 100644 --- a/proc.c +++ b/proc.c @@ -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)) { -- cgit v1.2.1