summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-26 00:56:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-26 00:56:44 +0000
commit7d6965f88d6abf0e1e9f92a58139dc56b27db07a (patch)
treecd35ad367588e1712e76fac1ab304f4412962bee /parse.y
parentc6c975ca4ed009e568ace27394f96f0e112616e6 (diff)
parse.y: brace after array literal arg
* parse.y (parser_yylex): array is another literal. set state to END too not only ENDARG and after a literal, so that a left brace after it should be a primary block bound to the literal, which causes syntax error. [ruby-core:81037] [Bug #13547] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59420 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 44a0bb6785..02d9412a2c 100644
--- a/parse.y
+++ b/parse.y
@@ -8374,7 +8374,7 @@ parser_yylex(struct parser_params *parser)
if (c == ')')
SET_LEX_STATE(EXPR_ENDFN);
else
- SET_LEX_STATE(EXPR_ENDARG);
+ SET_LEX_STATE(EXPR_END);
if (c == '}') {
if (!brace_nest--) c = tSTRING_DEND;
}