summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index 42fc94687..c1f888047 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -1274,6 +1274,7 @@ ret_args(parser_state *p, node *n)
yyerror(p, "block argument should not be given");
return NULL;
}
+ if (!n->car) return NULL;
if (!n->car->cdr) return n->car->car;
return new_array(p, n->car);
}