mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
* class.c (rb_define_class, rb_define_module): also set constant under
Object. [ruby-dev:20445] * object.c (boot_defclass): ditto. * variable.c (rb_const_get_at, rb_const_get_0, rb_mod_const_at, rb_const_defined, mod_av_set, rb_const_assign): toplevel constants are now under Object, rb_class_tbl remains for GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7bb1e40d8b
commit
442c836bfe
4 changed files with 15 additions and 27 deletions
1
object.c
1
object.c
|
@ -1341,6 +1341,7 @@ boot_defclass(name, super)
|
|||
|
||||
rb_name_class(obj, id);
|
||||
st_add_direct(rb_class_tbl, id, obj);
|
||||
rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue