summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-12-05 22:16:53 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-12-05 22:16:53 +0000
commitd1685ce96979defc6e775f1788f9afcc36ca3837 (patch)
tree96334dec91f0ba00e4e55e707e04c1b8c097dc4e /parse.y
parent253c38a903fb2c7fde30af7fb94ea14adfefe53d (diff)
backport from ruby_1_8
* parse.y (primary): should set NODE even when compstmt is NULL. merge from trunk. fixed: [ruby-dev:29732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@11350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index e2982f2c80..7b05c18f46 100644
--- a/parse.y
+++ b/parse.y
@@ -1481,7 +1481,8 @@ primary : literal
}
| tLPAREN compstmt ')'
{
- $$ = $2;
+ if (!$2) $$ = NEW_NIL();
+ else $$ = $2;
}
| primary_value tCOLON2 tCONSTANT
{