summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 800d001ccef..1bbf65f109e 100644
--- a/eval.c
+++ b/eval.c
@@ -9037,7 +9037,7 @@ rb_thread_raise(argc, argv, th)
rb_f_raise(argc, argv);
}
- if (THREAD_SAVE_CONTEXT(curr_thread)) {
+ if (!rb_thread_dead(curr_thread) && THREAD_SAVE_CONTEXT(curr_thread)) {
return th->thread;
}