summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-09 06:40:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-09 06:40:30 +0000
commit4e323c0a9d4f333ca6405c97893570df578dfbf8 (patch)
tree3faf6476aeecb73b25ca616d780072b49c29b25a /vm.c
parentf608b1b8dc3fd1ff9578e88c4ec3b55bf620f469 (diff)
vm.c: initialize root_svar
* vm.c (th_init, ruby_thread_init): initialize root_svar with Qnil, since lep_svar_place() expects uninitialized svar to be nil, not 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 2f8d121..e6a2a6d 100644
--- a/vm.c
+++ b/vm.c
@@ -1930,6 +1930,7 @@ th_init(rb_thread_t *th, VALUE self)
th->errinfo = Qnil;
th->last_status = Qnil;
th->waiting_fd = -1;
+ th->root_svar = Qnil;
#if OPT_CALL_THREADED_CODE
th->retval = Qundef;
@@ -1949,6 +1950,7 @@ ruby_thread_init(VALUE self)
th->top_wrapper = 0;
th->top_self = rb_vm_top_self();
+ th->root_svar = Qnil;
return self;
}