Merge pull request #96 from k-tsj/fix-return-segv

Fix SEGV when returning from terminated method
This commit is contained in:
Yukihiro "Matz" Matsumoto
2012-05-04 05:23:34 -07:00
+1
View File
@@ -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;