diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-29 05:37:26 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-29 05:37:26 +0000 |
commit | e9b851af73549aa9c97af1a5fb2171152f0585a6 (patch) | |
tree | 732ad770e3797212f3fe5bff4123b053d9376f7d /vm_insnhelper.c | |
parent | 10aa7c3d30214869c7ddb1c3f204133f21552978 (diff) |
merges r28043 from trunk into ruby_1_9_2.
--
* insns.def (invokesuper): check consistency between class of self and
class of method being invoked by super. This is temporary measure
for YARV. See [ruby-core:30313] in detail. See [ruby-dev:40959]
[ruby-dev:39772] [ruby-core:27000] [ruby-core:27230]
* vm_insnhelper.c (vm_search_superclass): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 0bd29b5208..3b442c8d9e 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1402,6 +1402,11 @@ vm_search_superclass(rb_control_frame_t *reg_cfp, rb_iseq_t *ip, } } + /* temporary measure for [Bug #2420] [Bug #3136] */ + if (!lcfp->me) { + rb_raise(rb_eNoMethodError, "super called outside of method"); + } + id = lcfp->me->def->original_id; klass = vm_search_normal_superclass(lcfp->me->klass, recv); } |