aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http.rb4
-rw-r--r--lib/net/http/response.rb2
2 files changed, 3 insertions, 3 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
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index 126c22160d..f51d6b1373 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -251,7 +251,7 @@ class Net::HTTPResponse
return yield @socket if self['content-range']
v = self['content-encoding']
- case v && v.downcase
+ case v&.downcase
when 'deflate', 'gzip', 'x-gzip' then
self.delete 'content-encoding'