aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/fetcher/compact_index.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index be5683db..b51ba150 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -97,13 +97,12 @@ module Bundler
end
def bundle_worker(func = nil)
- if @bundle_worker
- @bundle_worker.tap do |worker|
- worker.instance_variable_set(:@func, func) if func
- end
- else
+ @bundle_worker ||= begin
worker_name = "Compact Index (#{display_uri.host})"
- @bundle_worker ||= Bundler::Worker.new(25, worker_name, func)
+ Bundler::Worker.new(25, worker_name, func)
+ end
+ @bundle_worker.tap do |worker|
+ worker.instance_variable_set(:@func, func) if func
end
end