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 d308a2b8e1..bcff81b03d 100644
--- a/eval.c
+++ b/eval.c
@@ -11793,6 +11793,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);