summaryrefslogtreecommitdiffstats
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 591e60eff..473c53f4c 100644
--- a/eval.c
+++ b/eval.c
@@ -11738,6 +11738,9 @@ rb_thread_raise(argc, argv, th)
{
volatile rb_thread_t th_save = th;
+ if (!th->next) {
+ rb_raise(rb_eArgError, "unstarted thread");
+ }
if (rb_thread_dead(th)) return Qnil;
if (curr_thread == th) {
rb_f_raise(argc, argv);