Skip to content
Permalink
Browse files
push value for NULL AST when value is required; fix #3110
  • Loading branch information
matz committed Feb 17, 2016
1 parent ec35e54 commit d8fc09cf927aad33138b54bc79d286ac0636cc06
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1179,7 +1179,13 @@ codegen(codegen_scope *s, node *tree, int val)
{
int nt;

if (!tree) return;
if (!tree) {
if (val) {
genop(s, MKOP_A(OP_LOADNIL, cursp()));
push();
}
return;
}

if (s->irep && s->filename_index != tree->filename_index) {
s->irep->filename = mrb_parser_get_filename(s->parser, s->filename_index);

0 comments on commit d8fc09c

Please sign in to comment.