diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-06 19:15:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-06 19:15:29 +0000 |
commit | 9f1807d486b8acea96742ff0f504274ab0473cf2 (patch) | |
tree | bfb86d66ef7169c56b1e9cdf2f55d33cecc86941 /parse.y | |
parent | 43b7b9b229cd2be0f0d6493f0d2a6f4a31aa345d (diff) | |
download | ruby-9f1807d486b8acea96742ff0f504274ab0473cf2.tar.gz ruby-9f1807d486b8acea96742ff0f504274ab0473cf2.tar.xz ruby-9f1807d486b8acea96742ff0f504274ab0473cf2.zip |
* parse.y (stmt): should not expand mrhs if lhs is solely starred.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -486,7 +486,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem | mlhs '=' command_call { value_expr($3); - $1->nd_value = NEW_TO_ARY($3); + $1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3); $$ = $1; } | var_lhs tOP_ASGN command_call @@ -578,7 +578,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem } | mlhs '=' arg_value { - $1->nd_value = NEW_TO_ARY($3); + $1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3); $$ = $1; } | mlhs '=' mrhs |