[issue #428] Fixed bug with compact! and uniq!

This commit is contained in:
George Vinogradov 2012-07-04 18:57:23 +04:00
parent a909a92ae8
commit 02ae717af9
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ class AdvisoriesController < ApplicationController
@advisory.build_lists.find_in_batches(:include => [:save_to_platform, :packages, :project]) do |batch|
batch.each do |build_list|
h = { build_list.project => build_list.packages }
@packages_info[build_list.save_to_platform].merge!(h) { |pr, old, new| (old + new).compact!.uniq! }
# FIXME Maybe memory leak...
@packages_info[build_list.save_to_platform].merge!(h) { |pr, old, new| (old + new).compact.uniq }
end
end
end