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

ruby-changes:40901

From: normal <ko1@a...>
Date: Wed, 9 Dec 2015 06:28:17 +0900 (JST)
Subject: [ruby-changes:40901] normal:r52980 (trunk): test/uri/test_generic.rb (to_s): new test

normal	2015-12-09 06:27:34 +0900 (Wed, 09 Dec 2015)

  New Revision: 52980

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

  Log:
    test/uri/test_generic.rb (to_s): new test
    
    Ensure URI::Generic#to_s continues to return mutable strings to
    prevent breakage when we enable frozen string literals in future
    commits.
    
    [ruby-core:71820]

  Modified files:
    trunk/ChangeLog
    trunk/test/uri/test_generic.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52979)
+++ ChangeLog	(revision 52980)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Dec  9 06:25:47 2015  Eric Wong  <e@8...>
+
+	* test/uri/test_generic.rb (to_s): new test
+	  [ruby-core:71820]
+
 Wed Dec  9 02:18:52 2015  Koichi Sasada  <ko1@a...>
 
 	* compile.c (ibf_dump_memsize): should check NULL.
Index: test/uri/test_generic.rb
===================================================================
--- test/uri/test_generic.rb	(revision 52979)
+++ test/uri/test_generic.rb	(revision 52980)
@@ -14,6 +14,13 @@ class URI::TestGeneric < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/uri/test_generic.rb#L14
     uri.class.component.collect {|c| uri.send(c)}
   end
 
+  def test_to_s
+    exp = 'http://example.com/'.freeze
+    str = URI(exp).to_s
+    assert_equal exp, str
+    refute_predicate str, :frozen?, '[ruby-core:71785] [Bug #11759]'
+  end
+
   def test_parse
     # 0
     assert_kind_of(URI::HTTP, @base_url)

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

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