[前][次][番号順一覧][スレッド一覧]

ruby-changes:16116

From: yugui <ko1@a...>
Date: Sat, 29 May 2010 14:37:43 +0900 (JST)
Subject: [ruby-changes:16116] Ruby:r28071 (ruby_1_9_2): merges r28043 from trunk into ruby_1_9_2.

yugui	2010-05-29 14:37:26 +0900 (Sat, 29 May 2010)

  New Revision: 28071

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28071

  Log:
    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.

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/insns.def
    branches/ruby_1_9_2/vm_insnhelper.c

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28070)
+++ ruby_1_9_2/ChangeLog	(revision 28071)
@@ -1,3 +1,12 @@
+Fri May 28 00:32:25 2010  Yusuke Endoh  <mame@t...>
+
+	* 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.
+
 Thu May 27 12:42:23 2010  Akinori MUSHA  <knu@i...>
 
 	* LGPL: Removed.  We no longer have LGPL'd source files in our
Index: ruby_1_9_2/insns.def
===================================================================
--- ruby_1_9_2/insns.def	(revision 28070)
+++ ruby_1_9_2/insns.def	(revision 28071)
@@ -1022,6 +1022,12 @@
 
     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);
Index: ruby_1_9_2/vm_insnhelper.c
===================================================================
--- ruby_1_9_2/vm_insnhelper.c	(revision 28070)
+++ ruby_1_9_2/vm_insnhelper.c	(revision 28071)
@@ -1402,6 +1402,11 @@
 	    }
 	}
 
+	/* 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);
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]