mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
#compact! can return nil if no changes were made
This commit is contained in:
parent
5d59e03ed5
commit
6c172a30d3
1 changed files with 1 additions and 0 deletions
|
@ -22,6 +22,7 @@ module MemoryDiagnostics
|
||||||
diff = diff.map do |id|
|
diff = diff.map do |id|
|
||||||
ObjectSpace._id2ref(id) rescue nil
|
ObjectSpace._id2ref(id) rescue nil
|
||||||
end.compact!
|
end.compact!
|
||||||
|
diff ||= []
|
||||||
|
|
||||||
report = "#{diff.length} objects have leaked\n"
|
report = "#{diff.length} objects have leaked\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue