summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-08 14:38:43 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-08 14:38:43 +0000
commit4c1f8acd2ac14ffce1e1d9f414c700f293a7bdc6 (patch)
treedaa0944e91cc2bb3858eae18fde3d44630aa07b9 /insns.def
parent555035a349bb9d7659317dc65dc68ce6e2e6aaa7 (diff)
merge revision(s) 40583,40584,40585,40590: [Backport #8367]
* insns.def (defined): get method entry from the method top level frame, not block frame. [ruby-core:54769] [Bug #8367] * insns.def (defined): use vm_search_superclass() like as normal super call. based on a patch <https://gist.github.com/wanabe/5520026> by wanabe. * vm_insnhelper.c (vm_search_superclass): return error but not raise exceptions. * vm_insnhelper.c (vm_search_super_method): check the result of vm_search_superclass and raise execptions on error. vm_search_superclass and raise exceptions on error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index a36d659364..3d518d0489 100644
--- a/insns.def
+++ b/insns.def
@@ -764,10 +764,10 @@ defined
}
break;
case DEFINED_ZSUPER:{
- const rb_method_entry_t *me = GET_CFP()->me;
- if (me) {
- VALUE klass = vm_search_normal_superclass(GET_CFP()->klass);
- ID id = me->def ? me->def->original_id : me->called_id;
+ rb_call_info_t cit;
+ if (vm_search_superclass(GET_CFP(), GET_ISEQ(), Qnil, &cit) == 0) {
+ VALUE klass = cit.klass;
+ ID id = cit.mid;
if (rb_method_boundp(klass, id, 0)) {
expr_type = DEFINED_ZSUPER;
}