summaryrefslogtreecommitdiff
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 31f4694071..f4b2328dde 100644
--- a/eval.c
+++ b/eval.c
@@ -8110,6 +8110,9 @@ rb_cont_call(argc, argv, cont)
{
rb_thread_t th = rb_thread_check(cont);
+ if (th->next != curr_thread) {
+ rb_raise(rb_eRuntimeError, "continuation called across threads");
+ }
switch (argc) {
case 0:
th->result = Qnil;