summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-12 10:35:36 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-12 10:35:36 +0000
commitfd2f238560fb1dfc664036618f05eaa9ebc8cbaa (patch)
tree032b4785b98abb911d8c269213fbb8b2ae5ca8c7 /vm.c
parente1680f8cc1c6ba464710bc164720e47e749b0ac8 (diff)
* vm.c (thread_free): reset ruby_current_thread if it points the
thread to free. * gc.c (slot_sweep): don't call RUBY_VM_SET_FINALIZER_INTERRUPT if there is no current thread. [ruby-dev:43000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30522 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 f467055f92..130ca64160 100644
--- a/vm.c
+++ b/vm.c
@@ -1730,6 +1730,8 @@ thread_free(void *ptr)
#endif
ruby_xfree(ptr);
}
+ if (ruby_current_thread == th)
+ ruby_current_thread = NULL;
}
RUBY_FREE_LEAVE("thread");
}