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 /lib | |
parent | 0183613bf9d1d5c14be9fdf34af31ea1b94eb48e (diff) | |
download | ruby-67723c1e4673253b2f4a2c7204ccab9d0daaaeb9.tar.gz |
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 'lib')
-rw-r--r-- | lib/net/http.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index c648f0acc4..d632020458 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -560,7 +560,7 @@ module Net #:nodoc: # :call-seq: # HTTP.start(address, port, p_addr, p_port, p_user, p_pass, &block) - # HTTP.start(address, port=nil, p_addr=nil, p_port=nil, p_user=nil, p_pass=nil, opt, &block) + # HTTP.start(address, port=nil, p_addr=:ENV, p_port=nil, p_user=nil, p_pass=nil, opt, &block) # # Creates a new Net::HTTP object, then additionally opens the TCP # connection and HTTP session. @@ -591,6 +591,7 @@ module Net #:nodoc: def HTTP.start(address, *arg, &block) # :yield: +http+ arg.pop if opt = Hash.try_convert(arg[-1]) port, p_addr, p_port, p_user, p_pass = *arg + p_addr = :ENV if arg.size < 2 port = https_default_port if !port && opt && opt[:use_ssl] http = new(address, port, p_addr, p_port, p_user, p_pass) |