summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-05-28 18:37:41 +0200
committergit <svn-admin@ruby-lang.org>2022-05-30 17:43:12 +0900
commitd6684f063bc53e3cab025bd39526eca3b480b5e7 (patch)
tree0149db31abc96578f6c67c6f3ba1ac0b05f7ef45 /lib/bundler/settings.rb
parentea31c5bcd1bc1a019a6aee2b3f3b16813d7ff96d (diff)
[rubygems/rubygems] Fix crash when commenting out a mirror in configuration
https://github.com/rubygems/rubygems/commit/2d99277328
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 8f263cd012..398c66055a 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -487,7 +487,7 @@ module Bundler
/ix.freeze
def self.key_for(key)
- key = normalize_uri(key).to_s if key.is_a?(String) && /https?:/ =~ key
+ key = normalize_uri(key).to_s if key.is_a?(String) && key.start_with?("http", "mirror.http")
key = key.to_s.gsub(".", "__").gsub("-", "___").upcase
"BUNDLE_#{key}"
end