mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
f608b1b8dc
commit
4e323c0a9d
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jan 9 15:40:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm.c (th_init, ruby_thread_init): initialize root_svar with Qnil,
|
||||
since lep_svar_place() expects uninitialized svar to be nil, not 0.
|
||||
|
||||
Wed Jan 9 13:20:23 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* test/ruby/test_require.rb: improve test for r38744.
|
||||
|
|
2
vm.c
2
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue