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

ruby-changes:20294

From: matz <ko1@a...>
Date: Fri, 1 Jul 2011 03:34:16 +0900 (JST)
Subject: [ruby-changes:20294] matz:r32342 (trunk): * class.c (Init_class_hierarchy): should name BasicObject

matz	2011-07-01 03:34:09 +0900 (Fri, 01 Jul 2011)

  New Revision: 32342

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

  Log:
    * class.c (Init_class_hierarchy): should name BasicObject
      explicitly.
    
    * variable.c (rb_const_defined_0): should not check for
      superclasses as const_get.

  Modified files:
    trunk/ChangeLog
    trunk/class.c
    trunk/variable.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32341)
+++ ChangeLog	(revision 32342)
@@ -1,3 +1,11 @@
+Fri Jul  1 03:28:25 2011  Yukihiro Matsumoto  <matz@r...>
+
+	* class.c (Init_class_hierarchy): should name BasicObject
+	  explicitly.
+
+	* variable.c (rb_const_defined_0): should not check for
+	  superclasses as const_get.
+
 Fri Jul  1 03:24:03 2011  Tadayoshi Funaba  <tadf@d...>
 
 	* ext/date/date_core.c: mathn is still alive (should die soon).
Index: variable.c
===================================================================
--- variable.c	(revision 32341)
+++ variable.c	(revision 32342)
@@ -1829,7 +1829,7 @@
 		return (int)Qfalse;
 	    return (int)Qtrue;
 	}
-	if (!recurse && klass != rb_cObject) break;
+	if (!recurse) break;
 	tmp = RCLASS_SUPER(tmp);
     }
     if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
Index: class.c
===================================================================
--- class.c	(revision 32341)
+++ class.c	(revision 32342)
@@ -366,6 +366,7 @@
     rb_cModule = boot_defclass("Module", rb_cObject);
     rb_cClass =  boot_defclass("Class",  rb_cModule);
 
+    rb_const_set(rb_cObject, rb_intern("BasicObject"), rb_cBasicObject);
     RBASIC(rb_cClass)->klass
 	= RBASIC(rb_cModule)->klass
 	= RBASIC(rb_cObject)->klass

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

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