summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-21 07:44:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-21 07:44:25 +0000
commit543ed3652fff1be63e2c4452eba8abaa7abc83e4 (patch)
tree838272989667867f3c8b198b80cde39d70076683
parent3a12eb82b2cd4c7ad48d431695af586d353df12d (diff)
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
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 22ebb7d684..53ef6755c0 100644
--- a/parse.y
+++ b/parse.y
@@ -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;