зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] util/rubocop -A --only Style/MultilineTernaryOperator
https://github.com/rubygems/rubygems/commit/be853dfe3b
This commit is contained in:
Родитель
5efadf8139
Коммит
8a364b8512
|
@ -174,11 +174,13 @@ class Gem::BasicSpecification
|
|||
begin
|
||||
fullpath = nil
|
||||
suffixes = Gem.suffixes
|
||||
suffixes.find do |suf|
|
||||
if suffixes.find do |suf|
|
||||
full_require_paths.find do |dir|
|
||||
File.file?(fullpath = "#{dir}/#{path}#{suf}")
|
||||
end
|
||||
end ? fullpath : nil
|
||||
end
|
||||
fullpath
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -171,8 +171,7 @@ class Gem::Request
|
|||
no_env_proxy = env_proxy.nil? || env_proxy.empty?
|
||||
|
||||
if no_env_proxy
|
||||
return ["https", "http"].include?(downcase_scheme) ?
|
||||
:no_proxy : get_proxy_from_env("http")
|
||||
return ["https", "http"].include?(downcase_scheme) ? :no_proxy : get_proxy_from_env("http")
|
||||
end
|
||||
|
||||
require "uri"
|
||||
|
|
|
@ -341,8 +341,11 @@ gem 'other', version
|
|||
end
|
||||
|
||||
def test_generate_bin_bindir_with_user_install_warning
|
||||
bin_dir = Gem.win_platform? ? File.expand_path(ENV["WINDIR"]).upcase :
|
||||
bin_dir = if Gem.win_platform?
|
||||
File.expand_path(ENV["WINDIR"]).upcase
|
||||
else
|
||||
"/usr/bin"
|
||||
end
|
||||
|
||||
old_path = ENV["PATH"]
|
||||
ENV["PATH"] = [ENV["PATH"], bin_dir].compact.join(File::PATH_SEPARATOR)
|
||||
|
|
Загрузка…
Ссылка в новой задаче