summaryrefslogtreecommitdiff
path: root/test/uri/test_generic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/uri/test_generic.rb')
-rw-r--r--test/uri/test_generic.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index b449a0a0d1..d122587031 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -799,8 +799,12 @@ class URI::TestGeneric < Test::Unit::TestCase
u = URI("http://foo/bar")
assert_equal("http://foo/bar", u.to_s)
+ u.hostname = "[::1]"
+ assert_equal("http://[::1]/bar", u.to_s)
u.hostname = "::1"
assert_equal("http://[::1]/bar", u.to_s)
+ u.hostname = ""
+ assert_equal("http:///bar", u.to_s)
end
def test_build