mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
empty NODE_BEGIN should push nil; close #496
This commit is contained in:
@@ -951,6 +951,10 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
tree = tree->cdr;
|
||||
switch (nt) {
|
||||
case NODE_BEGIN:
|
||||
if (val && !tree) {
|
||||
genop(s, MKOP_A(OP_LOADNIL, cursp()));
|
||||
push();
|
||||
}
|
||||
while (tree) {
|
||||
codegen(s, tree->car, tree->cdr ? NOVAL : val);
|
||||
tree = tree->cdr;
|
||||
|
||||
Reference in New Issue
Block a user