summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-05 16:24:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-05 16:24:15 +0000
commit45f3651d1c0fbc286a3083eb03624fc9bc696232 (patch)
tree78e461cc1f4ed30257756b770fdc003dc2b20e4a /parse.y
parent68ff00d9e3381f4f960bc7669045fdb3a448551f (diff)
* parse.y (block_command, block_call): simplified rules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y26
1 files changed, 4 insertions, 22 deletions
diff --git a/parse.y b/parse.y
index 6b2c7111d7..f81819c9e5 100644
--- a/parse.y
+++ b/parse.y
@@ -1326,21 +1326,12 @@ command_call : command
;
block_command : block_call
- | block_call '.' operation2 command_args
+ | block_call dot_or_colon operation2 command_args
{
/*%%%*/
$$ = NEW_CALL($1, $3, $4);
/*%
- $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
- $$ = method_arg($$, $4);
- %*/
- }
- | block_call tCOLON2 operation2 command_args
- {
- /*%%%*/
- $$ = NEW_CALL($1, $3, $4);
- /*%
- $$ = dispatch3(call, $1, ripper_intern("::"), $3);
+ $$ = dispatch3(call, $1, $2, $3);
$$ = method_arg($$, $4);
%*/
}
@@ -3856,21 +3847,12 @@ block_call : command do_block
$$ = method_add_block($1, $2);
%*/
}
- | block_call '.' operation2 opt_paren_args
+ | block_call dot_or_colon operation2 opt_paren_args
{
/*%%%*/
$$ = NEW_CALL($1, $3, $4);
/*%
- $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
- $$ = method_optarg($$, $4);
- %*/
- }
- | block_call tCOLON2 operation2 opt_paren_args
- {
- /*%%%*/
- $$ = NEW_CALL($1, $3, $4);
- /*%
- $$ = dispatch3(call, $1, ripper_intern("::"), $3);
+ $$ = dispatch3(call, $1, $2, $3);
$$ = method_optarg($$, $4);
%*/
}