mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
a8fb40db8c
commit
0df938d5be
2 changed files with 12 additions and 0 deletions
|
@ -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>
|
Wed Dec 9 02:18:52 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* compile.c (ibf_dump_memsize): should check NULL.
|
* 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)}
|
uri.class.component.collect {|c| uri.send(c)}
|
||||||
end
|
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
|
def test_parse
|
||||||
# 0
|
# 0
|
||||||
assert_kind_of(URI::HTTP, @base_url)
|
assert_kind_of(URI::HTTP, @base_url)
|
||||||
|
|
Loading…
Add table
Reference in a new issue