summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-30 02:39:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-30 02:39:38 +0000
commitd1ffc6ae5385e8684e7e885d9155b9eefc5286cd (patch)
tree3b7d00bfc689316741117062d6c5434ccd22d8ff /parse.y
parent77411b3577ee04014479c0dcbc26342c2637e118 (diff)
* parse.y (primary): should not be NULL. [ruby-core:03098]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 ff8cc62e55..6a68ef2ca2 100644
--- a/parse.y
+++ b/parse.y
@@ -1448,7 +1448,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;} rparen