Check env context before jump from OP_RETURN; fix #3673

parent 27a5e104
......@@ -1821,7 +1821,7 @@ RETRY_TRY_BLOCK:
struct REnv *e = top_env(mrb, proc);
mrb_callinfo *ce;
if (!MRB_ENV_STACK_SHARED_P(e)) {
if (!MRB_ENV_STACK_SHARED_P(e) || e->cxt.c != mrb->c) {
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
goto L_RAISE;
}
......
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