restore context status to RUNNING on automatic yield at the end of the block; fix #1555

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-10-31 11:54:57 +09:00
parent abe6db9454
commit a228841668
+1
View File
@@ -1334,6 +1334,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
/* automatic yield at the end */
mrb->c->status = MRB_FIBER_TERMINATED;
mrb->c = mrb->c->prev;
mrb->c->status = MRB_FIBER_RUNNING;
}
ci = mrb->c->ci;
break;