summaryrefslogtreecommitdiff
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-11 14:13:56 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-11 14:13:56 +0000
commit91fc0a91037c08d56a43e852318982c9035e1c99 (patch)
treed1092251ef8d3f2d1ed4f67dc5e7e42fafa461d9 /test/test_tempfile.rb
parent6f8861433d8b923d1ff7d745bbc45c688601b3a7 (diff)
Use `&.` instead of modifier if and remove needless closed?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index 988dcf3a23..8c49498d18 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -361,7 +361,7 @@ puts Tempfile.new('foo').path
f.close
assert_file.exist?(path)
ensure
- f.close if f && !f.closed?
+ f&.close
File.unlink path if path
end