mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
reserve a register for a block parameter in a for statement body; ref #2375
This commit is contained in:
@@ -550,6 +550,7 @@ for_body(codegen_scope *s, node *tree)
|
||||
codegen(s, tree->cdr->car, VAL);
|
||||
/* generate loop-block */
|
||||
s = scope_new(s->mrb, s, NULL);
|
||||
push(); /* push for a block parameter */
|
||||
|
||||
lp = loop_push(s, LOOP_FOR);
|
||||
lp->pc1 = new_label(s);
|
||||
|
||||
Reference in New Issue
Block a user