[前][次][番号順一覧][スレッド一覧]

ruby-changes:15527

From: nobu <ko1@a...>
Date: Wed, 21 Apr 2010 13:36:22 +0900 (JST)
Subject: [ruby-changes:15527] Ruby:r27430 (trunk): * parse.y (parser_yylex): reverted r27388 due to backward

nobu	2010-04-21 13:36:05 +0900 (Wed, 21 Apr 2010)

  New Revision: 27430

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27430

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

  Modified files:
    trunk/ChangeLog
    trunk/bootstraptest/test_syntax.rb
    trunk/parse.y

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27429)
+++ ChangeLog	(revision 27430)
@@ -1,5 +1,8 @@
-Wed Apr 21 12:15:46 2010  Nobuyoshi Nakada  <nobu@r...>
+Wed Apr 21 13:36:01 2010  Nobuyoshi Nakada  <nobu@r...>
 
+	* parse.y (parser_yylex): reverted r27388 due to backward
+	  compatibility.
+
 	* parse.y (parser_yylex): warn confusing binary operators after
 	  local variable.
 
Index: bootstraptest/test_syntax.rb
===================================================================
--- bootstraptest/test_syntax.rb	(revision 27429)
+++ bootstraptest/test_syntax.rb	(revision 27430)
@@ -890,6 +890,3 @@
 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)
Index: parse.y
===================================================================
--- parse.y	(revision 27429)
+++ parse.y	(revision 27430)
@@ -7203,8 +7203,9 @@
 	    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 ':';
 	}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]