summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-12-28 17:35:48 +0800
committerSamuel Giddins <segiddins@segiddins.me>2016-01-25 10:49:51 -0600
commita3f2dd291a092ddbbece81bc3aeb2bf732a4b7cc (patch)
tree216d92014e8cc87cb281e64c765c77b037909bca
parent3b06cf37ddf836b3535b86e51357519d704fcf7f (diff)
downloadbundler-a3f2dd291a092ddbbece81bc3aeb2bf732a4b7cc.tar.gz
it’s supposed to return an array
Turns out that very old RubyGems returned a hash here, with each remote URI as the key and the array of specs as the value. We don’t deal with multiple remotes at the same time, though, so we just want the array of spec values.
-rw-r--r--lib/bundler/rubygems_integration.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index d9fb41f748..cedb935b43 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -181,7 +181,7 @@ module Bundler
def fetch_prerelease_specs
fetch_specs(false, true)
rescue Gem::RemoteFetcher::FetchError
- [] # if we can't download them, there aren't any
+ {} # if we can't download them, there aren't any
end
# TODO: This is for older versions of Rubygems... should we support the
@@ -194,9 +194,9 @@ module Bundler
# Fetch all specs, minus prerelease specs
spec_list = fetch_specs(true, false)
# Then fetch the prerelease specs
- fetch_prerelease_specs.each {|k, v| spec_list[k] += v }
+ fetch_prerelease_specs.each {|k, v| spec_list[k].push(*v) }
- spec_list
+ spec_list.values.first
ensure
Bundler.rubygems.sources = old_sources
end