From a3f2dd291a092ddbbece81bc3aeb2bf732a4b7cc Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Mon, 28 Dec 2015 17:35:48 +0800 Subject: =?UTF-8?q?it=E2=80=99s=20supposed=20to=20return=20an=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- lib/bundler/rubygems_integration.rb | 6 +++--- 1 file 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 -- cgit v1.2.1