diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-21 07:44:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-21 07:44:25 +0000 |
commit | 543ed3652fff1be63e2c4452eba8abaa7abc83e4 (patch) | |
tree | 838272989667867f3c8b198b80cde39d70076683 /parse.y | |
parent | 3a12eb82b2cd4c7ad48d431695af586d353df12d (diff) | |
download | ruby-543ed3652fff1be63e2c4452eba8abaa7abc83e4.tar.gz |
parse.y: fix state after left brace
* parse.y (parser_yylex): as well as `tLBRACE_ARG` (expr block),
`tLBRACE` (primary block) also does not accept a label. only
hash brace accepts a label.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8082,7 +8082,7 @@ parser_yylex(struct parser_params *p) c = tLBRACE; /* hash */ COND_PUSH(0); CMDARG_PUSH(0); - SET_LEX_STATE(c == tLBRACE_ARG ? EXPR_BEG : EXPR_BEG|EXPR_LABEL); + SET_LEX_STATE(c != tLBRACE ? EXPR_BEG : EXPR_BEG|EXPR_LABEL); if (c != tLBRACE) p->command_start = TRUE; return c; |