aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb4
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