ruby-changes:63292
From: Chris <ko1@a...>
Date: Wed, 7 Oct 2020 07:42:10 +0900 (JST)
Subject: [ruby-changes:63292] fef52122b0 (master): Use proc_binding rather than rb_funcall
https://git.ruby-lang.org/ruby.git/commit/?id=fef52122b0 From fef52122b0c0dfabf947c3f016334b84a9eeb903 Mon Sep 17 00:00:00 2001 From: Chris Seaton <chris.seaton@s...> Date: Mon, 5 Oct 2020 23:51:34 +0100 Subject: Use proc_binding rather than rb_funcall FIX diff --git a/proc.c b/proc.c index b6285b1..061c6c3 100644 --- a/proc.c +++ b/proc.c @@ -48,6 +48,7 @@ VALUE rb_cProc; https://github.com/ruby/ruby/blob/trunk/proc.c#L48 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 https://github.com/ruby/ruby/blob/trunk/proc.c#L2744 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/