aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-15 06:44:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-15 06:44:36 +0000
commitab3a3948b0f94a616461b0da9bc6769e13673e23 (patch)
treea9a4e5c2aed30ceb6b9ba75dfe0980f5a6e2c69b /parse.y
parent2e0ebf4e080331773fcd1c5f2f37cdce74569e99 (diff)
downloadruby-ab3a3948b0f94a616461b0da9bc6769e13673e23.tar.gz
parse.y: kwarg to method with same name variable
* parse.y (parse_ident): allow keyword arguments just after a method where the same name local variable is defined. [ruby-core:73816] [Bug#12073] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 3cbb282d01..b8d5e6cbf1 100644
--- a/parse.y
+++ b/parse.y
@@ -8073,7 +8073,7 @@ parse_ident(struct parser_params *parser, int c, int cmd_state)
ident = tokenize_ident(parser, last_state);
if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
lvar_defined(ident)) {
- SET_LEX_STATE(EXPR_END);
+ SET_LEX_STATE(EXPR_END|EXPR_LABEL);
}
return result;
}