Skip to content

Commit

Permalink
OP_BLKPUSH is invalid outside of methods; fix #3501
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Mar 13, 2017
1 parent 916b8ed commit 877f43b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
if (lv == 0) stack = regs + 1;
else {
struct REnv *e = uvenv(mrb, lv-1);
if (!e) {
if (!e || e->mid == 0) {
localjump_error(mrb, LOCALJUMP_ERROR_YIELD);
goto L_RAISE;
}
Expand Down

0 comments on commit 877f43b

Please sign in to comment.