aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 2cdc88acc9..35202ce07b 100644
--- a/eval.c
+++ b/eval.c
@@ -159,6 +159,9 @@ ruby_cleanup(volatile int ex)
rb_thread_t *th = GET_THREAD();
int nerr;
+ /* protect from thread.raise */
+ th->status = THREAD_KILLED;
+
rb_threadptr_interrupt(th);
rb_threadptr_check_signal(th);
PUSH_TAG();