[rubygems/rubygems] Avoid is_a? check before using normalize_uri

31cb15d03f
This commit is contained in:
David Rodríguez 2024-05-29 16:09:58 +02:00 committed by git
parent 60620509f4
commit da10d1ddea

View file

@ -533,8 +533,9 @@ module Bundler
/ix
def self.key_for(key)
key = normalize_uri(key) if key.is_a?(String) && key.start_with?("http", "mirror.http")
key = key_to_s(key).gsub(".", "__")
key = key_to_s(key)
key = normalize_uri(key) if key.start_with?("http", "mirror.http")
key = key.gsub(".", "__")
key.gsub!("-", "___")
key.upcase!