summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-06 10:19:55 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-06 10:19:55 +0000
commit5fcc43e2d3e51da520ccc6c2d09c7a52e2bd87f8 (patch)
treec2cff853754f8762c9e3f1d242bd422aa3726b98 /vm.c
parent4a80c0540f0f9b3303919ee7209eedfac856a1af (diff)
cont.c: direct use of rb_thread_t
The only usage of rb_fiber_reset_root_local_storage() is from ruby_vm_destruct(), where the object space is already terminated. This `th->self` is not alive. Why not just use `th` itself. See also: https://travis-ci.org/ruby/ruby/jobs/451294954 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65574 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 f7d4b65f67..f487bd881a 100644
--- a/vm.c
+++ b/vm.c
@@ -2201,7 +2201,7 @@ ruby_vm_destruct(rb_vm_t *vm)
struct rb_objspace *objspace = vm->objspace;
vm->main_thread = 0;
if (th) {
- rb_fiber_reset_root_local_storage(th->self);
+ rb_fiber_reset_root_local_storage(th);
thread_free(th);
}
rb_vm_living_threads_init(vm);