diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-18 08:19:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-18 08:19:24 +0000 |
commit | 6c0deb7b87ec4b1e586de59e320e27d648b0e2bb (patch) | |
tree | 3cede9a43a8acf72c5ce93865d993de6a91d9bcd /parse.y | |
parent | 078f8c1af37ae2623a80ca769887664fed5afd95 (diff) | |
download | ruby-6c0deb7b87ec4b1e586de59e320e27d648b0e2bb.tar.gz |
parse.y: fix labelarg
* parse.y (IS_BEG): include labeled argument state, which was
EXPR_LABELARG. [ruby-dev:49221] [Bug #11456]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -7108,7 +7108,7 @@ parser_prepare(struct parser_params *parser) #define IS_ARG() IS_lex_state(EXPR_ARG_ANY) #define IS_END() IS_lex_state(EXPR_END_ANY) -#define IS_BEG() IS_lex_state(EXPR_BEG_ANY) +#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) #define IS_LABEL_POSSIBLE() (\ (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \ @@ -8361,7 +8361,7 @@ parser_yylex(struct parser_params *parser) return tSYMBEG; case '/': - if (IS_lex_state(EXPR_BEG_ANY)) { + if (IS_BEG()) { lex_strterm = NEW_STRTERM(str_regexp, '/', 0); return tREGEXP_BEG; } |