diff --git a/ChangeLog b/ChangeLog index 79d858da6d..5c5e270b09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Jul 1 03:28:25 2011 Yukihiro Matsumoto + + * 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 * ext/date/date_core.c: mathn is still alive (should die soon). diff --git a/class.c b/class.c index c6d011f2b6..d427393081 100644 --- a/class.c +++ b/class.c @@ -366,6 +366,7 @@ Init_class_hierarchy(void) 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 diff --git a/variable.c b/variable.c index ef7e3f6138..251fb3bafb 100644 --- a/variable.c +++ b/variable.c @@ -1829,7 +1829,7 @@ rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse, int visibility) 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) {