1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use &. instead of modifier if

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-08-01 00:19:10 +00:00
parent bf87195ea3
commit 53b88cc66c

View file

@ -237,7 +237,7 @@ module TestNetHTTP_version_1_1_methods
begin begin
h = Net::HTTP.start(config('host'), config('port')) h = Net::HTTP.start(config('host'), config('port'))
ensure ensure
h.finish if h h&.finish
end end
assert_equal config('host'), h.address assert_equal config('host'), h.address
assert_equal config('port'), h.port assert_equal config('port'), h.port
@ -246,7 +246,7 @@ module TestNetHTTP_version_1_1_methods
begin begin
h = Net::HTTP.start(config('host'), config('port'), :ENV) h = Net::HTTP.start(config('host'), config('port'), :ENV)
ensure ensure
h.finish if h h&.finish
end end
assert_equal config('host'), h.address assert_equal config('host'), h.address
assert_equal config('port'), h.port assert_equal config('port'), h.port
@ -255,7 +255,7 @@ module TestNetHTTP_version_1_1_methods
begin begin
h = Net::HTTP.start(config('host'), config('port'), nil) h = Net::HTTP.start(config('host'), config('port'), nil)
ensure ensure
h.finish if h h&.finish
end end
assert_equal config('host'), h.address assert_equal config('host'), h.address
assert_equal config('port'), h.port assert_equal config('port'), h.port