diff options
author | Lukas Zapletal <lzap+git@redhat.com> | 2020-10-07 13:23:00 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-22 14:54:28 +0900 |
commit | c46a4b8c7f434110c30c9587e02387283076579f (patch) | |
tree | 199455a0beb1a153a8bea9e1bf4f3081b192d51a /test | |
parent | 6e06c980dace26ff2f06eb4ac1e2d06291101ee7 (diff) | |
download | ruby-c46a4b8c7f434110c30c9587e02387283076579f.tar.gz |
[ruby/uri] Optimize URI#hostname and URI#hostname=
https://github.com/ruby/uri/commit/3b7ccfd835
Diffstat (limited to 'test')
-rw-r--r-- | test/uri/test_generic.rb | 4 |
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 |