summaryrefslogtreecommitdiffstats
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
commit60ea4e93262301fda59b3925a062de33659b4d1e (patch)
treea3b0c71a5af92bc32654742681fcc5edc8371a94 /parse.y
parentde19e0159964553bfc981f75c61891a47239e45a (diff)
downloadruby-60ea4e93262301fda59b3925a062de33659b4d1e.tar.gz
ruby-60ea4e93262301fda59b3925a062de33659b4d1e.tar.xz
ruby-60ea4e93262301fda59b3925a062de33659b4d1e.zip
* 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: http://svn.ruby-lang.org/repos/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 d24cf0615..bb39af8e3 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);
%*/