diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-19 15:13:42 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-19 15:13:42 +0000 |
commit | 67723c1e4673253b2f4a2c7204ccab9d0daaaeb9 (patch) | |
tree | 338afdc1ae8da9407ef1616d5d6ec1d8f919fa28 /test | |
parent | 0183613bf9d1d5c14be9fdf34af31ea1b94eb48e (diff) |
Net::HTTP#start now pass :ENV to p_addr by default [Bug #13351]
To avoid this, pass nil explicitly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/net/http/test_http.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 7db5909f96..13d1803aa9 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -233,6 +233,23 @@ end module TestNetHTTP_version_1_1_methods + def test_s_start + h = Net::HTTP.start(config('host'), config('port')) + assert_equal config('host'), h.address + assert_equal config('port'), h.port + assert_equal true, h.instance_variable_get(:@proxy_from_env) + + h = Net::HTTP.start(config('host'), config('port'), :ENV) + assert_equal config('host'), h.address + assert_equal config('port'), h.port + assert_equal true, h.instance_variable_get(:@proxy_from_env) + + h = Net::HTTP.start(config('host'), config('port'), nil) + assert_equal config('host'), h.address + assert_equal config('port'), h.port + assert_equal false, h.instance_variable_get(:@proxy_from_env) + end + def test_s_get assert_equal $test_net_http_data, Net::HTTP.get(config('host'), '/', config('port')) |