summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2021-02-01 19:16:54 +0900
committerNARUSE, Yui <naruse@airemix.jp>2021-02-01 19:16:54 +0900
commit147453ad1e85bc94506c269e363e736675946908 (patch)
tree886002638fffb322541b4e99ce642893f9a760c2 /vm_insnhelper.c
parent5501e1038eb1f606d4b941115fcc45e6e01a0de4 (diff)
merge revision(s) 85b5d4c8bf4cdcba4f1af65f2bc0c8ac716cb795: [Backport #17509]
Revert "[Bug #11213] let defined?(super) call respond_to_missing?" This reverts commit fac2498e0299f13dffe4f09a7dd7657fb49bf643 for now, due to [Bug #17509], the breakage in the case `super` is called in `respond_to?`. --- internal/vm.h | 2 +- test/ruby/test_defined.rb | 33 --------------------------------- vm_insnhelper.c | 4 ++-- vm_method.c | 12 +++++++----- 4 files changed, 10 insertions(+), 41 deletions(-)
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;
}
}