mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (stmt, arg): reverted r15450. [ruby-core:15526]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4aa1d12937
commit
4660cc6fb9
2 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,4 @@
|
|||
Wed Feb 13 03:12:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (stmt, arg): concat opt_call_args only if non-null.
|
||||
Wed Feb 13 04:15:44 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (arg_concat_gen, arg_append_gen): optimize for array push.
|
||||
|
||||
|
|
14
parse.y
14
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue