summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-27 15:39:34 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-27 15:39:34 +0000
commitb18fcd6a7c45f4726f8ee68dfac4cae662caf384 (patch)
treed8c7d65e87259e359f8229d94a089a17ff15c838 /insns.def
parent97c175fa19d0d58eaabace94f737c4c08368b476 (diff)
downloadruby-b18fcd6a7c45f4726f8ee68dfac4cae662caf384.tar.gz
* 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/trunk@28043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def6
1 files changed, 6 insertions, 0 deletions
diff --git a/insns.def b/insns.def
index 79b92d8a4d..23c0143907 100644
--- a/insns.def
+++ b/insns.def
@@ -1022,6 +1022,12 @@ invokesuper
recv = GET_SELF();
vm_search_superclass(GET_CFP(), GET_ISEQ(), recv, TOPN(num), &id, &klass);
+
+ /* temporary measure for [Bug #2402] [Bug #2502] [Bug #3136] */
+ if (!rb_obj_is_kind_of(recv, klass)) {
+ rb_raise(rb_eNotImpError, "super from singleton method that is defined to multiple classes is not supported; this will be fixed in 1.9.3 or later");
+ }
+
me = rb_method_entry(klass, id);
CALL_METHOD(num, blockptr, flag, id, me, recv);