mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
vm.c: initialize defined_module_hash early
* vm.c (Init_BareVM): initialize defined_module_hash here, Init_top_self() is too late to register core classes/modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a7d04e536b
commit
15798b606e
3 changed files with 14 additions and 1 deletions
2
vm.c
2
vm.c
|
@ -2617,6 +2617,7 @@ Init_BareVM(void)
|
|||
th->vm = vm;
|
||||
th_init(th, 0);
|
||||
ruby_thread_init_stack(th);
|
||||
vm->defined_module_hash = rb_hash_new();
|
||||
}
|
||||
|
||||
/* top self */
|
||||
|
@ -2644,7 +2645,6 @@ Init_top_self(void)
|
|||
|
||||
/* initialize mark object array, hash */
|
||||
vm->mark_object_ary = rb_ary_tmp_new(1);
|
||||
vm->defined_module_hash = rb_hash_new();
|
||||
}
|
||||
|
||||
VALUE *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue