summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 39efee27c9..d4d4ebbb1c 100644
--- a/vm.c
+++ b/vm.c
@@ -1838,6 +1838,7 @@ ruby_thread_init(VALUE self)
GetThreadPtr(self, th);
th_init(th, self);
+ rb_iv_set(self, "locals", rb_hash_new());
th->vm = vm;
th->top_wrapper = 0;
@@ -2178,6 +2179,7 @@ Init_VM(void)
/* create main thread */
th_self = th->self = TypedData_Wrap_Struct(rb_cThread, &thread_data_type, th);
+ rb_iv_set(th_self, "locals", rb_hash_new());
vm->main_thread = th;
vm->running_thread = th;
th->vm = vm;