aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-11 08:33:37 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-11 08:33:37 +0000
commit2c3c2e3dc9e345ff1da386f0113258ddf3085584 (patch)
tree633e4614586d7bec374934181da7c4e702f3a58a /test/test_tempfile.rb
parent623408107c62313583acf3cfb32f58e8073b7141 (diff)
downloadruby-2c3c2e3dc9e345ff1da386f0113258ddf3085584.tar.gz
test/test_{tempfile,tmpdir}: get rid of leftover files
I ran out of inodes in $TMPDIR git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb5
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