mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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.
This commit is contained in:
parent
0362b4c689
commit
53edb27bac
Notes:
git
2020-12-14 15:28:33 +09:00
2 changed files with 36 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue