ruby-changes:49882
From: nobu <ko1@a...>
Date: Sun, 21 Jan 2018 16:52:03 +0900 (JST)
Subject: [ruby-changes:49882] nobu:r62000 (trunk): parse.y: fix state after left brace
nobu 2018-01-21 16:44:25 +0900 (Sun, 21 Jan 2018) New Revision: 62000 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62000 Log: 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. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61999) +++ parse.y (revision 62000) @@ -8082,7 +8082,7 @@ parser_yylex(struct parser_params *p) https://github.com/ruby/ruby/blob/trunk/parse.y#L8082 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/