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

ruby-changes:44790

From: nobu <ko1@a...>
Date: Tue, 22 Nov 2016 07:45:32 +0900 (JST)
Subject: [ruby-changes:44790] nobu:r56863 (trunk): Revert r56856

nobu	2016-11-22 07:45:26 +0900 (Tue, 22 Nov 2016)

  New Revision: 56863

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56863

  Log:
    Revert r56856
    
    * parse.y: tCHAR can be concatenated.

  Modified files:
    trunk/parse.y
    trunk/test/ruby/test_literal.rb
Index: test/ruby/test_literal.rb
===================================================================
--- test/ruby/test_literal.rb	(revision 56862)
+++ test/ruby/test_literal.rb	(revision 56863)
@@ -90,6 +90,9 @@ class TestRubyLiteral < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_literal.rb#L90
     assert_equal "\u201c", eval(%[?\\\u{201c}]), bug6069
     assert_equal "\u201c".encode("euc-jp"), eval(%[?\\\u{201c}].encode("euc-jp")), bug6069
     assert_equal "\u201c".encode("iso-8859-13"), eval(%[?\\\u{201c}].encode("iso-8859-13")), bug6069
+
+    assert_equal "ab", eval("?a 'b'")
+    assert_equal "a\nb", eval("<<A 'b'\na\nA")
   end
 
   def test_dstring
Index: parse.y
===================================================================
--- parse.y	(revision 56862)
+++ parse.y	(revision 56863)
@@ -3869,10 +3869,10 @@ strings		: string https://github.com/ruby/ruby/blob/trunk/parse.y#L3869
 			$$ = $1;
 		    %*/
 		    }
-		| tCHAR
 		;
 
-string		: string1
+string		: tCHAR
+		| string1
 		| string string1
 		    {
 		    /*%%%*/

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

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