diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-09 02:14:27 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-09 02:14:27 +0000 |
commit | 52102f6ff50eebf8c16667c9b49cef579d2057c1 (patch) | |
tree | f4a2548e1562f4741c4ecefca4fdf512882e8814 /test | |
parent | 86f6fa45f8a27338c9e07f5e9772a74a43a96c2c (diff) |
test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files
Quiet a false-positive warning from TestHtgroup#test_htgroup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/leakchecker.rb | 3 |
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 |