mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
[rubygems/rubygems] Avoid is_a?
check before using normalize_uri
31cb15d03f
This commit is contained in:
parent
60620509f4
commit
da10d1ddea
1 changed files with 3 additions and 2 deletions
|
@ -533,8 +533,9 @@ module Bundler
|
||||||
/ix
|
/ix
|
||||||
|
|
||||||
def self.key_for(key)
|
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)
|
||||||
key = key_to_s(key).gsub(".", "__")
|
key = normalize_uri(key) if key.start_with?("http", "mirror.http")
|
||||||
|
key = key.gsub(".", "__")
|
||||||
key.gsub!("-", "___")
|
key.gsub!("-", "___")
|
||||||
key.upcase!
|
key.upcase!
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue