summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-14 14:51:39 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-14 15:28:09 +0900
commit53edb27baccaffe919c2885a9c86312cc51ea9fb (patch)
treee559108379bd763767e2ffd333a76781fc94c3d5 /vm_eval.c
parent0362b4c689e319e233691ee052cd703bf8d2baa1 (diff)
use method cache on Object#respond_to?
rb_method_boundp (method_boundp) searches method_entry, but this search did not use pCMC, so change to use it.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3899
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_eval.c b/vm_eval.c
index b26c88ffe0..9cf1bfcd69 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -389,8 +389,8 @@ check_funcall_failed(VALUE v, VALUE e)
struct rescue_funcall_args *args = (void *)v;
int ret = args->respond;
if (!ret) {
- switch (rb_method_boundp(args->defined_class, args->mid,
- BOUND_PRIVATE|BOUND_RESPONDS)) {
+ switch (method_boundp(args->defined_class, args->mid,
+ BOUND_PRIVATE|BOUND_RESPONDS)) {
case 2:
ret = TRUE;
break;