aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_request_connection_pools.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_request_connection_pools.rb')
-rw-r--r--test/rubygems/test_gem_request_connection_pools.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_request_connection_pools.rb b/test/rubygems/test_gem_request_connection_pools.rb
index 1cf6b27979..403f7679f8 100644
--- a/test/rubygems/test_gem_request_connection_pools.rb
+++ b/test/rubygems/test_gem_request_connection_pools.rb
@@ -80,6 +80,15 @@ class TestGemRequestConnectionPool < Gem::TestCase
assert_equal ['example', 80], net_http_args
end
+ def test_net_http_args_ipv6
+ pools = Gem::Request::ConnectionPools.new nil, []
+
+ net_http_args = pools.send :net_http_args, URI('http://[::1]'), nil
+
+ expected_host = RUBY_VERSION >= "1.9.3" ? "::1" : "[::1]"
+ assert_equal [expected_host, 80], net_http_args
+ end
+
def test_net_http_args_proxy
pools = Gem::Request::ConnectionPools.new nil, []