summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-04 13:04:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-04 13:04:37 +0000
commit40c6eaf6d8b5cda6733b8a904f1f04a64aa7d101 (patch)
tree2a7bdc2c976f33cdea5d0415b5a834761dcd0beb /vm.c
parentfffbcf286762b9f78dec19c59aaa8ce0babb5551 (diff)
vm.c: Init_vm_objects
* vm.c (Init_vm_objects): initialize VM internal objects, after heap initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/vm.c b/vm.c
index 82bf75bc44..c89d3a35f3 100644
--- a/vm.c
+++ b/vm.c
@@ -2726,7 +2726,17 @@ Init_BareVM(void)
th->vm = vm;
th_init(th, 0);
ruby_thread_init_stack(th);
+}
+
+void
+Init_vm_objects(void)
+{
+ rb_vm_t *vm = GET_VM();
+
vm->defined_module_hash = rb_hash_new();
+
+ /* initialize mark object array, hash */
+ vm->mark_object_ary = rb_ary_tmp_new(1);
}
/* top self */
@@ -2751,9 +2761,6 @@ Init_top_self(void)
vm->top_self = rb_obj_alloc(rb_cObject);
rb_define_singleton_method(rb_vm_top_self(), "to_s", main_to_s, 0);
rb_define_alias(rb_singleton_class(rb_vm_top_self()), "inspect", "to_s");
-
- /* initialize mark object array, hash */
- vm->mark_object_ary = rb_ary_tmp_new(1);
}
VALUE *