mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c (Init_class_hierarchy): should name BasicObject
explicitly. * variable.c (rb_const_defined_0): should not check for superclasses as const_get. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd26a9d656
commit
8fca66d7eb
3 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Fri Jul 1 03:28:25 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@dotrb.org>
|
Fri Jul 1 03:24:03 2011 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
* ext/date/date_core.c: mathn is still alive (should die soon).
|
* ext/date/date_core.c: mathn is still alive (should die soon).
|
||||||
|
|
1
class.c
1
class.c
|
@ -366,6 +366,7 @@ Init_class_hierarchy(void)
|
||||||
rb_cModule = boot_defclass("Module", rb_cObject);
|
rb_cModule = boot_defclass("Module", rb_cObject);
|
||||||
rb_cClass = boot_defclass("Class", rb_cModule);
|
rb_cClass = boot_defclass("Class", rb_cModule);
|
||||||
|
|
||||||
|
rb_const_set(rb_cObject, rb_intern("BasicObject"), rb_cBasicObject);
|
||||||
RBASIC(rb_cClass)->klass
|
RBASIC(rb_cClass)->klass
|
||||||
= RBASIC(rb_cModule)->klass
|
= RBASIC(rb_cModule)->klass
|
||||||
= RBASIC(rb_cObject)->klass
|
= RBASIC(rb_cObject)->klass
|
||||||
|
|
|
@ -1829,7 +1829,7 @@ rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse, int visibility)
|
||||||
return (int)Qfalse;
|
return (int)Qfalse;
|
||||||
return (int)Qtrue;
|
return (int)Qtrue;
|
||||||
}
|
}
|
||||||
if (!recurse && klass != rb_cObject) break;
|
if (!recurse) break;
|
||||||
tmp = RCLASS_SUPER(tmp);
|
tmp = RCLASS_SUPER(tmp);
|
||||||
}
|
}
|
||||||
if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
|
if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
|
||||||
|
|
Loading…
Reference in a new issue