Merge pull request #3872 from carsonreinke/memory_diagnostics

#compact! can return nil if no changes were made
This commit is contained in:
Robin Ward 2015-10-28 03:37:20 +11:00
commit 4b332513b4

View file

@ -21,7 +21,8 @@ module MemoryDiagnostics
require 'objspace'
diff = diff.map do |id|
ObjectSpace._id2ref(id) rescue nil
end.compact!
end
diff.compact!
report = "#{diff.length} objects have leaked\n"