parse.y: ambiguous parentheses
* parse.y (parser_yylex): warn ambiguous parentheses after a space in method definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dacf977a42
commit
65e27c8b13
4
parse.y
4
parse.y
@ -8520,6 +8520,10 @@ parser_yylex(struct parser_params *parser)
|
||||
else if (IS_SPCARG(-1)) {
|
||||
c = tLPAREN_ARG;
|
||||
}
|
||||
else if (IS_lex_state(EXPR_ENDFN) && space_seen) {
|
||||
rb_warning0("parentheses after method name is interpreted as");
|
||||
rb_warning0("an argument list, not a decomposed argument");
|
||||
}
|
||||
paren_nest++;
|
||||
COND_PUSH(0);
|
||||
CMDARG_PUSH(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user