summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-29 08:39:47 (GMT)
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-29 08:39:47 (GMT)
commit7735502d2c6d838c45e5fdb962e4dc2796f495aa (patch)
tree0f1105b25838af01509484dc66f3b7d2b48d3979 /vm_insnhelper.c
parent684bdf6171b76f5bc5e4f05926a5ab01ec2b4fd5 (diff)
Unused module refinement shouldn't break method search.
Use rb_callable_method_entry_t::defined_class instead of rb_callable_method_entry_t::owner, because the superclass of iclass should be searched for modules. [ruby-core:83613] [Bug #14068] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 3c08a74..9a2f3cb 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2314,7 +2314,7 @@ vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, st
cc->me = refined_method_callable_without_refinement(cc->me);
}
else {
- VALUE klass = RCLASS_SUPER(cc->me->owner);
+ VALUE klass = RCLASS_SUPER(cc->me->defined_class);
cc->me = klass ? rb_callable_method_entry(klass, ci->mid) : NULL;
}
return vm_call_method(ec, cfp, calling, ci, cc);