aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r--lib/rubygems/remote_fetcher.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index c10f9ebae8..f00555a1e2 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -324,7 +324,11 @@ class Gem::RemoteFetcher
# connections to reduce connect overhead.
def request(uri, request_class, last_modified = nil)
- Gem::Request.new(uri, request_class, last_modified, @proxy).fetch
+ request = Gem::Request.new uri, request_class, last_modified, @proxy
+
+ request.fetch do |req|
+ yield req if block_given?
+ end
end
def https?(uri)