From 1441c5366b5eff87c3600672634c5e3122dc6eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ren=C3=A9=20Hanke?= Date: Thu, 6 Sep 2012 18:02:00 +0200 Subject: [PATCH] - duplicate code --- server/lib/picky/backends/redis.rb | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/server/lib/picky/backends/redis.rb b/server/lib/picky/backends/redis.rb index 54bbaed6..c587c600 100644 --- a/server/lib/picky/backends/redis.rb +++ b/server/lib/picky/backends/redis.rb @@ -248,27 +248,14 @@ def ids combinations, amount, offset end end end + # Call the newly installed version. + # + ids combinations, amount, offset else - class << self - def ids combinations, _, _ - # Get the ids for each combination. - # - id_arrays = combinations.inject([]) do |total, combination| - total << combination.ids - end - - # Call the optimized C algorithm. - # - # Note: It orders the passed arrays by size. - # - Performant::Array.memory_efficient_intersect id_arrays - end - end + # Simply super call. + # + super end - - # Call the newly installed version. - # - ids combinations, amount, offset end # Generate a multiple host/process safe result id.