mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user