summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-04-05 13:53:43 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-04-05 13:53:43 +0900
commit60d20e1848c4049d725e482a0288eba4e7cc9304 (patch)
treea78dc364e3187b8c35724f7ce524c35182fea153
parent7f37c2fc57f7126b856265d9189fb91f2263eeb8 (diff)
downloadmruby-60d20e1848c4049d725e482a0288eba4e7cc9304.tar.gz
mruby-60d20e1848c4049d725e482a0288eba4e7cc9304.zip
Should restore to the root fiber for each interaction; fix #3537
-rw-r--r--mrbgems/mruby-bin-mirb/tools/mirb/mirb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
index d633a09b2..deabd591c 100644
--- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
+++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
@@ -551,6 +551,8 @@ done:
mrb_top_self(mrb),
stack_keep);
stack_keep = proc->body.irep->nlocals;
+ /* restore to fiber */
+ mrb->c = mrb->root_c;
/* did an exception occur? */
if (mrb->exc) {
p(mrb, mrb_obj_value(mrb->exc), 0);