From ada94ccb0a29c2b90cdd0124a276602836c9cc65 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Thu, 14 Jan 2016 16:25:51 -0600 Subject: [RuboCop] Fix Performance/TimesMap --- .rubocop_todo.yml | 5 ----- lib/bundler/worker.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 57a7d2e4f1..35abaa4c6a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -92,11 +92,6 @@ Performance/RedundantMerge: - 'lib/bundler/cli/gem.rb' - 'spec/support/helpers.rb' -# Offense count: 1 -Performance/TimesMap: - Exclude: - - 'lib/bundler/worker.rb' - # Offense count: 1 Style/AccessorMethodName: Exclude: diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb index addd9cc8a1..e74823e202 100644 --- a/lib/bundler/worker.rb +++ b/lib/bundler/worker.rb @@ -24,7 +24,7 @@ module Bundler @request_queue = Queue.new @response_queue = Queue.new @func = func - @threads = size.times.map do |i| + @threads = Array.new(size) do |i| Thread.start { process_queue(i) }.tap do |thread| thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=) end -- cgit v1.2.1