OP_BLKPUSH is invalid outside of methods; fix #3501

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-03-13 22:03:31 +09:00
parent 916b8ed5c8
commit 877f43bca5
+1 -1
View File
@@ -1892,7 +1892,7 @@ RETRY_TRY_BLOCK:
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;
}