util/rubocop -A --only Performance/Casecmp
This commit is contained in:
parent
866831d8e9
commit
b6d3c06936
@ -82,8 +82,8 @@ Do you want to add this source?
|
||||
def check_rubygems_https(source_uri) # :nodoc:
|
||||
uri = URI source_uri
|
||||
|
||||
if uri.scheme && uri.scheme.downcase == "http" &&
|
||||
uri.host.downcase == "rubygems.org"
|
||||
if uri.scheme && uri.scheme.casecmp("http").zero? &&
|
||||
uri.host.casecmp("rubygems.org").zero?
|
||||
question = <<-QUESTION.chomp
|
||||
https://rubygems.org is recommended for security over #{uri}
|
||||
|
||||
|
@ -320,7 +320,7 @@ class Gem::RemoteFetcher
|
||||
end
|
||||
|
||||
def https?(uri)
|
||||
uri.scheme.downcase == "https"
|
||||
uri.scheme.casecmp("https").zero?
|
||||
end
|
||||
|
||||
def close_all
|
||||
|
@ -45,7 +45,7 @@ class Gem::Request::ConnectionPools # :nodoc:
|
||||
end
|
||||
|
||||
def https?(uri)
|
||||
uri.scheme.downcase == "https"
|
||||
uri.scheme.casecmp("https").zero?
|
||||
end
|
||||
|
||||
def no_proxy?(host, env_no_proxy)
|
||||
|
Loading…
x
Reference in New Issue
Block a user