[rubygems/rubygems] Use ! methods once we have a new copy of the string. Use .prepend to avoid allocating a new string.
https://github.com/rubygems/rubygems/commit/2ac35a661f
This commit is contained in:
parent
29aab66e6b
commit
b5a0630cd0
@ -512,8 +512,11 @@ module Bundler
|
|||||||
|
|
||||||
def self.key_for(key)
|
def self.key_for(key)
|
||||||
key = normalize_uri(key).to_s if key.is_a?(String) && key.start_with?("http", "mirror.http")
|
key = normalize_uri(key).to_s if key.is_a?(String) && key.start_with?("http", "mirror.http")
|
||||||
key = key.to_s.gsub(".", "__").gsub("-", "___").upcase
|
key = key.to_s.gsub(".", "__")
|
||||||
"BUNDLE_#{key}"
|
key.gsub!("-", "___")
|
||||||
|
key.upcase!
|
||||||
|
|
||||||
|
key.prepend("BUNDLE_")
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: duplicates Rubygems#normalize_uri
|
# TODO: duplicates Rubygems#normalize_uri
|
||||||
|
Loading…
x
Reference in New Issue
Block a user