diff options
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r-- | test/test_tempfile.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index 8c49498d18..4b31e7f158 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -400,6 +400,9 @@ puts Tempfile.new('foo').path actual = Dir.glob(TRAVERSAL_PATH + '*').count assert_equal expect, actual ensure - t&.close + if t + File.unlink(t.path) + t.close + end end end |