summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-12 19:15:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-12 19:15:46 +0000
commita8589e18fc1824fa642febc61532a1d2b8418716 (patch)
tree4027ae0a4ba22ab9c6d5c7a1c37e135283791d24 /parse.y
parent80d332658941824a741a0d2451c81e1491cf82a5 (diff)
downloadruby-a8589e18fc1824fa642febc61532a1d2b8418716.tar.gz
ruby-a8589e18fc1824fa642febc61532a1d2b8418716.tar.xz
ruby-a8589e18fc1824fa642febc61532a1d2b8418716.zip
* parse.y (stmt, arg): reverted r15450. [ruby-core:15526]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y14
1 files changed, 8 insertions, 6 deletions
diff --git a/parse.y b/parse.y
index 593557f9e..24fc338e5 100644
--- a/parse.y
+++ b/parse.y
@@ -1027,10 +1027,11 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem
| primary_value '[' opt_call_args rbracket tOP_ASGN command_call
{
/*%%%*/
- NODE *args = $6;
+ NODE *args;
- value_expr(args);
- if ($3) args = arg_concat(args, $3);
+ value_expr($6);
+ if (!$3) $3 = NEW_ZARRAY();
+ args = arg_concat($6, $3);
if ($5 == tOROP) {
$5 = 0;
}
@@ -1828,10 +1829,11 @@ arg : lhs '=' arg
| primary_value '[' opt_call_args rbracket tOP_ASGN arg
{
/*%%%*/
- NODE *args = $6;
+ NODE *args;
- value_expr(args);
- if ($3) args = arg_concat(args, $3);
+ value_expr($6);
+ if (!$3) $3 = NEW_ZARRAY();
+ args = arg_concat($6, $3);
if ($5 == tOROP) {
$5 = 0;
}