From 02ae717af9677f2d5ae1def198818dd52ed5e553 Mon Sep 17 00:00:00 2001 From: George Vinogradov Date: Wed, 4 Jul 2012 18:57:23 +0400 Subject: [PATCH] [issue #428] Fixed bug with compact! and uniq! --- app/controllers/advisories_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/advisories_controller.rb b/app/controllers/advisories_controller.rb index 96af28e02..90f46ee25 100644 --- a/app/controllers/advisories_controller.rb +++ b/app/controllers/advisories_controller.rb @@ -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