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

ruby-changes:30701

From: nobu <ko1@a...>
Date: Mon, 2 Sep 2013 23:56:12 +0900 (JST)
Subject: [ruby-changes:30701] nobu:r42780 (trunk): test_string.rb: yet another test

nobu	2013-09-02 23:56:03 +0900 (Mon, 02 Sep 2013)

  New Revision: 42780

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

  Log:
    test_string.rb: yet another test
    
    * test/ruby/test_string.rb (TestString#test_frozen_string_adjacent):
      option is allowed after the last string.

  Modified files:
    trunk/test/ruby/test_string.rb
Index: test/ruby/test_string.rb
===================================================================
--- test/ruby/test_string.rb	(revision 42779)
+++ test/ruby/test_string.rb	(revision 42780)
@@ -2225,6 +2225,17 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L2225
     assert_equal "2", f.call
   end
 
+  def test_frozen_string_adjacent
+    str = nil
+    assert_nothing_raised(SyntaxError) do
+      eval(%{
+        str = "hello" "world"f
+      })
+    end
+    assert_equal "helloworld", str
+    assert_predicate str, :frozen?
+  end
+
   def test_frozen_string_cannot_be_adjacent
     assert_raise(SyntaxError) do
       eval(%{

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

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