summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-13 11:59:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-13 11:59:27 +0000
commit15798b606e48a478e3a8ef03547858fd320f912c (patch)
tree414c08905ddf85235d5c8bf36be0d8fb402245f9 /vm.c
parenta7d04e536b2c140c39774fb632bd7d3d02c53c4a (diff)
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
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 032bcdb0b3..acae935446 100644
--- a/vm.c
+++ b/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 *