summaryrefslogtreecommitdiff
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
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