diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-01-13 16:49:05 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-01-13 18:11:46 +0900 |
commit | 85b5d4c8bf4cdcba4f1af65f2bc0c8ac716cb795 (patch) | |
tree | b7a5aa2ebe8cc22ddf94a6edca03469d9f309e9e /vm_insnhelper.c | |
parent | 9441f3f97087a4325ee80911859d37da41fa5050 (diff) | |
download | ruby-85b5d4c8bf4cdcba4f1af65f2bc0c8ac716cb795.tar.gz |
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?`.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index e88fb8a4c2..bb75406edb 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3997,7 +3997,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; @@ -4038,7 +4038,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; } } |