diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-26 01:24:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-26 01:24:52 +0000 |
commit | c07d78eb0e8e9d3a8f9e8c860b362964157ff43a (patch) | |
tree | fb070b46cc783fb2d8d9fd40141dbd7607d6e872 /parse.y | |
parent | 47809f09346a7a026b56635bf7a2b84069fbbe39 (diff) | |
download | bundler-c07d78eb0e8e9d3a8f9e8c860b362964157ff43a.tar.gz |
parse.y: keyword argument without paren
* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
after method definition without a parenthesis. [ruby-core:52820]
[Bug #7942]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6760,7 +6760,7 @@ parser_prepare(struct parser_params *parser) #define IS_END() IS_lex_state(EXPR_END_ANY) #define IS_BEG() IS_lex_state(EXPR_BEG_ANY) #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) -#define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG) && !cmd_state) || IS_ARG()) +#define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) |