summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 73ba44a12e..6bbb4bca9b 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3999,7 +3999,7 @@ 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_ec_obj_respond_to(ec, klass, v, SYM2ID(obj), TRUE)) {
+ if (rb_ec_obj_respond_to(ec, v, SYM2ID(obj), TRUE)) {
expr_type = DEFINED_METHOD;
}
break;
@@ -4040,7 +4040,7 @@ vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_
VALUE klass = vm_search_normal_superclass(me->defined_class);
ID id = me->def->original_id;
- if (rb_ec_obj_respond_to(ec, klass, GET_SELF(), id, TRUE)) {
+ if (rb_method_boundp(klass, id, 0)) {
expr_type = DEFINED_ZSUPER;
}
}