Changed evaluation order of `yield`; ref
So that `yield expr_with_error` will cause the error from the
argument rather than `LocalJumpError` when no block is given.
@@ -2017,7 +2017,6 @@ codegen(codegen_scope *s, node *tree, int val)
if (!s2) break;
}
if (s2) ainfo = s2->ainfo;
- genop(s, MKOP_ABx(OP_BLKPUSH, cursp(), (ainfo<<4)|(lv & 0xf)));
push();
if (tree) {
n = gen_values(s, tree, VAL, 0);
@@ -2027,6 +2026,7 @@ codegen(codegen_scope *s, node *tree, int val)
}
}
pop_n(n+1);
+ genop(s, MKOP_ABx(OP_BLKPUSH, cursp(), (ainfo<<4)|(lv & 0xf)));
if (sendv) n = CALL_MAXARGS;
genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "call")), n));
if (val) push();
