summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 37923ecde..4c5c0b55b 100644
--- a/eval.c
+++ b/eval.c
@@ -7980,6 +7980,7 @@ rb_thread_remove(th)
rb_thread_ready(th);
rb_thread_die(th);
+ if (th->status == THREAD_KILLED) return; /* died in process */
th->prev->next = th->next;
th->next->prev = th->prev;
}
@@ -9004,6 +9005,7 @@ rb_thread_start_0(fn, arg, th_arg)
}
}
rb_thread_schedule();
+ ruby_stop(0); /* last thread termination */
return 0; /* not reached */
}