aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-07 07:16:05 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-07 07:16:05 +0000
commit0ec2b20d2f1339ab1e4d41567f9b37d733802968 (patch)
treea3b0c71a5af92bc32654742681fcc5edc8371a94 /parse.y
parent174b77b2805bca12afb67d24bfc4ce9182a8daac (diff)
downloadruby-0ec2b20d2f1339ab1e4d41567f9b37d733802968.tar.gz
* parse.y: fix node construction (around f_margs).
[ruby-dev:31143] * bootstraptest/test_block.rb: add a test for above. * insnhelper.ci: fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index d24cf06157..bb39af8e30 100644
--- a/parse.y
+++ b/parse.y
@@ -3003,7 +3003,7 @@ f_marg : f_norm_arg
| tLPAREN f_margs rparen
{
/*%%%*/
- $$ = $2;
+ $$ = NEW_LIST($2);
/*%
$$ = dispatch1(mlhs_paren, $2);
%*/
@@ -3013,7 +3013,7 @@ f_marg : f_norm_arg
f_marg_head : f_marg
{
/*%%%*/
- $$ = NEW_LIST($1);
+ $$ = $1;
/*%
$$ = mlhs_add(mlhs_new(), $1);
%*/
@@ -3047,7 +3047,7 @@ f_margs : f_marg_head
| f_marg_head ',' tSTAR f_norm_arg ',' f_marg
{
/*%%%*/
- $$ = NEW_MASGN($1, NEW_POSTARG($4,$6));
+ $$ = NEW_MASGN($1, NEW_POSTARG(assignable($4, 0), $6));
/*%
$$ = mlhs_add_star($1, $4);
%*/
@@ -3063,7 +3063,7 @@ f_margs : f_marg_head
| f_marg_head ',' tSTAR ',' f_marg
{
/*%%%*/
- $$ = NEW_MASGN($1, NEW_POSTARG(-1,$5));
+ $$ = NEW_MASGN($1, NEW_POSTARG(-1, $5));
/*%
$$ = mlhs_add_star($1, $5);
%*/