summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 18:02:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 18:02:19 +0000
commit1d41fe84f9c1402290d5d566b735975b8dbe2722 (patch)
treeb7ccd2c3416669201563cf30a62451aef5ab27e5 /parse.y
parent2c40f3a7a93bdbc9dcb1c7e9a3711ed17c77e547 (diff)
* parse.y (command): block from cmd_brace_block was ignored.
[ruby-dev:32644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y9
1 files changed, 6 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index de0b596f51..08a25df257 100644
--- a/parse.y
+++ b/parse.y
@@ -1264,8 +1264,9 @@ command : operation command_args %prec tLOWEST
| operation command_args cmd_brace_block
{
/*%%%*/
- $$ = NEW_FCALL($1, $2);
block_dup_check($2,$3);
+ $3->nd_iter = NEW_FCALL($1, $2);
+ $$ = $3;
fixpos($$, $2);
/*%
$$ = dispatch2(command, $1, $2);
@@ -1284,8 +1285,9 @@ command : operation command_args %prec tLOWEST
| primary_value '.' operation2 command_args cmd_brace_block
{
/*%%%*/
- $$ = NEW_CALL($1, $3, $4);
block_dup_check($4,$5);
+ $5->nd_iter = NEW_CALL($1, $3, $4);
+ $$ = $5;
fixpos($$, $1);
/*%
$$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
@@ -1304,8 +1306,9 @@ command : operation command_args %prec tLOWEST
| primary_value tCOLON2 operation2 command_args cmd_brace_block
{
/*%%%*/
- $$ = NEW_CALL($1, $3, $4);
block_dup_check($4,$5);
+ $5->nd_iter = NEW_CALL($1, $3, $4);
+ $$ = $5;
fixpos($$, $1);
/*%
$$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);