diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-12 16:27:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-12 16:27:22 +0000 |
commit | ef5c9090b6679a216c6ff46f433a4c25d4b6f566 (patch) | |
tree | 92388e3d51ae9826d909aa3b81906a74d8e8d360 /parse.y | |
parent | 25cf8b0eb14e1f0b1816a3542c85753e2e113c51 (diff) | |
download | ruby-ef5c9090b6679a216c6ff46f433a4c25d4b6f566.tar.gz ruby-ef5c9090b6679a216c6ff46f433a4c25d4b6f566.tar.xz ruby-ef5c9090b6679a216c6ff46f433a4c25d4b6f566.zip |
* parse.y (stmt, arg): concat opt_call_args only if non-null.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1027,11 +1027,10 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem | primary_value '[' opt_call_args rbracket tOP_ASGN command_call { /*%%%*/ - NODE *args; + NODE *args = $6; - value_expr($6); - if (!$3) $3 = NEW_ZARRAY(); - args = arg_concat($6, $3); + value_expr(args); + if ($3) args = arg_concat(args, $3); if ($5 == tOROP) { $5 = 0; } @@ -1829,11 +1828,10 @@ arg : lhs '=' arg | primary_value '[' opt_call_args rbracket tOP_ASGN arg { /*%%%*/ - NODE *args; + NODE *args = $6; - value_expr($6); - if (!$3) $3 = NEW_ZARRAY(); - args = arg_concat($6, $3); + value_expr(args); + if ($3) args = arg_concat(args, $3); if ($5 == tOROP) { $5 = 0; } |