diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-11 14:13:56 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-11 14:13:56 +0000 |
commit | 91fc0a91037c08d56a43e852318982c9035e1c99 (patch) | |
tree | d1092251ef8d3f2d1ed4f67dc5e7e42fafa461d9 /test | |
parent | 6f8861433d8b923d1ff7d745bbc45c688601b3a7 (diff) | |
download | ruby-91fc0a91037c08d56a43e852318982c9035e1c99.tar.gz |
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')
-rw-r--r-- | test/test_tempfile.rb | 2 |
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 |