1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (parser_yylex): reverted r27388 due to backward

compatibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-04-21 04:36:05 +00:00
parent 2e1efa9499
commit 82ba40b434
3 changed files with 6 additions and 5 deletions

View file

@ -1,4 +1,7 @@
Wed Apr 21 12:15:46 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
Wed Apr 21 13:36:01 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_yylex): reverted r27388 due to backward
compatibility.
* parse.y (parser_yylex): warn confusing binary operators after
local variable.

View file

@ -890,6 +890,3 @@ assert_valid_syntax('x y { "#{}".z { } }', bug1240)
assert_valid_syntax('x y { "#{}".z do end }', bug1240)
assert_valid_syntax('y "#{a 1}" do end', '[ruby-core:29579]')
bug3163 = '[ruby-core:29578]'
assert_valid_syntax('foo = 1; foo :bar', bug3163)

View file

@ -7203,8 +7203,9 @@ parser_yylex(struct parser_params *parser)
lex_state = EXPR_DOT;
return tCOLON2;
}
if ((IS_END() && !space_seen) || ISSPACE(c)) {
if (IS_END() || ISSPACE(c)) {
pushback(c);
warn_balanced(":", "symbol literal");
lex_state = EXPR_BEG;
return ':';
}