summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-02 07:26:10 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-02 07:26:10 +0000
commit34adacb036e1aac4b6b914e1515e4a907c30a0b7 (patch)
treecf3603e802f78e3bb5b3dce4ae7d0cb927d9179a /parse.y
parentf2469dc78a869cac2d1b2264cb9c131ee882cf19 (diff)
* parse.y (method_call): new experiment: "(expr)(args...)" to
invoke "expr.call(args...)". [EXPERIMENTAL] * parse.y (command): revert implicit "call" for local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y16
1 files changed, 14 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 5d2e6690de..99cab85b7a 100644
--- a/parse.y
+++ b/parse.y
@@ -3316,6 +3316,18 @@ method_call : operation paren_args
$$ = dispatch0(zsuper);
%*/
}
+ | tLPAREN compstmt ')' paren_args
+ {
+ /*%%%*/
+ if (!$2) $2 = NEW_NIL();
+ $$ = new_call($2, rb_intern("call"), $4);
+ fixpos($$, $2);
+ /*%
+ $$ = dispatch3(call, dispatch1(paren, $2),
+ ripper_id2sym('.'), rb_intern("call"));
+ $$ = method_optarg($$, $4);
+ %*/
+ }
;
brace_block : '{'
@@ -7869,10 +7881,10 @@ new_fcall_gen(parser, m, a)
NODE *a;
{
if (a && nd_type(a) == NODE_BLOCK_PASS) {
- a->nd_iter = fcall_gen(parser,m,a->nd_head);
+ a->nd_iter = NEW_FCALL(m,a->nd_head);
return a;
}
- return fcall_gen(parser, m,a);
+ return NEW_FCALL(m, a);
}
static NODE*