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
commit8f77ea14b47ae50245e32e4f895f681a0d8aebdf (patch)
tree28742f67037e987c84d5483a04bc32891241d0c3 /parse.y
parentd8383cf938f5ee9c82ca8452a46e1a5035ecba4e (diff)
* parse.y (primary): should not be NULL. [ruby-core:03098]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@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 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 ')'