diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-15 17:41:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-15 17:41:46 +0000 |
commit | 8b019eed78fbf8e66e25bc9b1bf753204cea9b0f (patch) | |
tree | 58991cd3a91bba3d1aa7286c091c6e57c0a6951d | |
parent | fbb51ff44cef3a28658285783b810acc8cbae048 (diff) | |
download | ruby-8b019eed78fbf8e66e25bc9b1bf753204cea9b0f.tar.gz |
parse.y: short circuit by result
* parse.y (parse_ident): short circuit by result, as only
tIDENTIFIER can be a local variable, but tFID and tCONSTANT not.
fix up r53834.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | parse.y | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8072,6 +8072,7 @@ parse_ident(struct parser_params *parser, int c, int cmd_state) ident = tokenize_ident(parser, last_state); if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && + (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */ lvar_defined(ident)) { SET_LEX_STATE(EXPR_END|EXPR_LABEL); } |