diff options
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index f910c036f1..f8936b33c5 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3651,12 +3651,9 @@ vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_ } case DEFINED_FUNC: klass = CLASS_OF(v); - if (rb_method_boundp(klass, SYM2ID(obj), 0)) { + if (rb_ec_obj_respond_to(ec, v, SYM2ID(obj), TRUE)) { expr_type = DEFINED_METHOD; } - else { - expr_type = check_respond_to_missing(obj, v); - } break; case DEFINED_METHOD:{ VALUE klass = CLASS_OF(v); |