aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-03-25 20:57:43 +0100
committergit <svn-admin@ruby-lang.org>2022-06-11 18:43:22 +0900
commitd5288c8aad5b3de8ac48305b43b983ea30a0535d (patch)
tree92980a5100e01dc61cb13240471f575241db2644 /lib
parent7e1788e180cdcb370ac85152842e14eaf482dd59 (diff)
downloadruby-d5288c8aad5b3de8ac48305b43b983ea30a0535d.tar.gz
[rubygems/rubygems] Refactor ambiguous gems check
https://github.com/rubygems/rubygems/commit/a00c79a4da
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/source/rubygems.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 5dceacbae4..700c4bf38c 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -157,9 +157,7 @@ module Bundler
# by rubygems.org are broken and wrong.
if spec.remote
# Check for this spec from other sources
- uris = [spec.remote.anonymized_uri]
- uris += remotes_for_spec(spec).map(&:anonymized_uri)
- uris.uniq!
+ uris = [spec.remote, *remotes_for_spec(spec)].map(&:anonymized_uri).uniq
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
path = fetch_gem(spec, options[:previous_spec])