diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-26 00:56:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-26 00:56:44 +0000 |
commit | 7d6965f88d6abf0e1e9f92a58139dc56b27db07a (patch) | |
tree | cd35ad367588e1712e76fac1ab304f4412962bee /parse.y | |
parent | c6c975ca4ed009e568ace27394f96f0e112616e6 (diff) | |
download | ruby-7d6965f88d6abf0e1e9f92a58139dc56b27db07a.tar.gz |
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.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |