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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2015-12-08 21:27:34 +00:00
Родитель a8fb40db8c
Коммит 0df938d5be
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Wed Dec 9 06:25:47 2015 Eric Wong <e@80x24.org>
* test/uri/test_generic.rb (to_s): new test
[ruby-core:71820]
Wed Dec 9 02:18:52 2015 Koichi Sasada <ko1@atdot.net>
* compile.c (ibf_dump_memsize): should check NULL.

Просмотреть файл

@ -14,6 +14,13 @@ class URI::TestGeneric < Test::Unit::TestCase
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)