diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-14 08:05:35 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-14 08:05:35 +0000 |
commit | 059c9c1cf371e049c7481c78b76e9620da52757f (patch) | |
tree | b383b59a1a2761c5fa2110fdd7712e80f02d08ea /lib/net/http.rb | |
parent | 6cf568f4b56dcafc5c0fe84df2c0d2491fb0c62b (diff) | |
download | ruby-059c9c1cf371e049c7481c78b76e9620da52757f.tar.gz |
* ext/socket/lib/socket.rb: use safe navigation operator.
[fix GH-1142] Patch by @mlarraz
* lib/drb/extservm.rb: ditto.
* lib/net/http.rb: ditto.
* lib/net/http/response.rb: ditto.
* lib/scanf.rb: ditto.
* lib/uri/generic.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index fa6185b0ba..70f5165e91 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1055,7 +1055,7 @@ module Net #:nodoc: # The address of the proxy server, if one is configured. def proxy_address if @proxy_from_env then - proxy_uri && proxy_uri.hostname + proxy_uri&.hostname else @proxy_address end @@ -1064,7 +1064,7 @@ module Net #:nodoc: # The port of the proxy server, if one is configured. def proxy_port if @proxy_from_env then - proxy_uri && proxy_uri.port + proxy_uri&.port else @proxy_port end |