summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-09 14:50:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-09 14:50:24 +0000
commitc222de6d9908ce0004ea7b43d49f85938797e6da (patch)
tree542c96b2cb95eff8d06c4f463f14e7a56c45080a /eval.c
parent58fdef4c05842e8f373268ee6e6809df130c0016 (diff)
downloadruby-c222de6d9908ce0004ea7b43d49f85938797e6da.tar.gz
ruby-c222de6d9908ce0004ea7b43d49f85938797e6da.tar.xz
ruby-c222de6d9908ce0004ea7b43d49f85938797e6da.zip
* eval.c (rb_thread_start_0): prevent thread from GC.
[ruby-dev:21572] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 033134cb3..8fb1ac6a5 100644
--- a/eval.c
+++ b/eval.c
@@ -9385,6 +9385,7 @@ rb_thread_start_0(fn, arg, th)
rb_thread_t th;
{
volatile rb_thread_t th_save = th;
+ volatile VALUE thread = th->thread;
struct BLOCK *volatile saved_block = 0, *block;
enum thread_status status;
int state;
@@ -9408,7 +9409,7 @@ rb_thread_start_0(fn, arg, th)
#endif
if (THREAD_SAVE_CONTEXT(curr_thread)) {
- return th_save->thread;
+ return thread;
}
if (ruby_block) { /* should nail down higher blocks */