summaryrefslogtreecommitdiff
path: root/test/net/http
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-01 00:19:10 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-01 00:19:10 +0000
commit53b88cc66c5a640fe230ac3894998ccadd140354 (patch)
tree16112060a5ac8abfadd2c38e6996e06c267c58f5 /test/net/http
parentbf87195ea37d9607e21e50a1e7df63a2cdd6451f (diff)
Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/http')
-rw-r--r--test/net/http/test_http.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 9f766c5722..7ec08f5d1e 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -237,7 +237,7 @@ module TestNetHTTP_version_1_1_methods
begin
h = Net::HTTP.start(config('host'), config('port'))
ensure
- h.finish if h
+ h&.finish
end
assert_equal config('host'), h.address
assert_equal config('port'), h.port
@@ -246,7 +246,7 @@ module TestNetHTTP_version_1_1_methods
begin
h = Net::HTTP.start(config('host'), config('port'), :ENV)
ensure
- h.finish if h
+ h&.finish
end
assert_equal config('host'), h.address
assert_equal config('port'), h.port
@@ -255,7 +255,7 @@ module TestNetHTTP_version_1_1_methods
begin
h = Net::HTTP.start(config('host'), config('port'), nil)
ensure
- h.finish if h
+ h&.finish
end
assert_equal config('host'), h.address
assert_equal config('port'), h.port