Commit 7e1df105 authored by Kazuki Tsujimoto's avatar Kazuki Tsujimoto

Fix SEGV when returning from terminated method

parent 5a6193ff
......@@ -992,6 +992,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
case OP_R_RETURN:
if (proc->env->cioff < 0) {
localjump_error(mrb, "return");
goto L_RAISE;
}
ci = mrb->ci = mrb->cibase + proc->env->cioff;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment