parse.y: lparen_arg statement

allow parenthesised statement as a method argument.
reported [Feature:12686] in bugs.ruby-lang.org fixed in CRuby 2.4.
This commit is contained in:
Nobuyoshi Nakada
2016-08-19 11:05:11 +09:00
parent 0597f66b23
commit 73dd82e30a
+1 -1
View File
@@ -2090,7 +2090,7 @@ primary : literal
$<stack>$ = p->cmdarg_stack;
p->cmdarg_stack = 0;
}
expr {p->lstate = EXPR_ENDARG;} rparen
stmt {p->lstate = EXPR_ENDARG;} rparen
{
p->cmdarg_stack = $<stack>2;
$$ = $3;