summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--bootstraptest/test_syntax.rb3
-rw-r--r--parse.y3
3 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e32814..d2a6acf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 30219c0..44db11b 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -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)
diff --git a/parse.y b/parse.y
index 9603d61..23f4362 100644
--- a/parse.y
+++ b/parse.y
@@ -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 ':';
}