aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/leakchecker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/leakchecker.rb')
-rw-r--r--test/lib/leakchecker.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lib/leakchecker.rb b/test/lib/leakchecker.rb
index af9200bf77..d37f865883 100644
--- a/test/lib/leakchecker.rb
+++ b/test/lib/leakchecker.rb
@@ -128,7 +128,8 @@ class LeakChecker
[prev_count, []]
else
tempfiles = ObjectSpace.each_object(Tempfile).find_all {|t|
- t.instance_variable_defined?(:@tmpfile) and t.path
+ t.instance_variable_defined?(:@tmpfile) and t.path and
+ File.exist?(t.path)
}
[count, tempfiles]
end