diff options
-rw-r--r-- | tool/lib/leakchecker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb index 7518f49ae3..69aeb2c254 100644 --- a/tool/lib/leakchecker.rb +++ b/tool/lib/leakchecker.rb @@ -155,8 +155,8 @@ class LeakChecker if prev_count == count [prev_count, []] else - tempfiles = ObjectSpace.each_object(Tempfile).find_all {|t| - t.instance_variable_defined?(:@tmpfile) and t.path + tempfiles = ObjectSpace.each_object(Tempfile).reject {|t| + t.instance_variables.empty? || t.closed? } [count, tempfiles] end |