summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 2cc199097f..9f01320a8d 100644
--- a/parse.y
+++ b/parse.y
@@ -1438,7 +1438,10 @@ primary : literal
bodystmt
kEND
{
- $$ = NEW_BEGIN($3);
+ if ($3 == NULL)
+ $$ = NEW_NIL();
+ else
+ $$ = NEW_BEGIN($3);
nd_set_line($$, $<num>1);
}
| tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} opt_nl ')'