[rubygems/rubygems] util/rubocop -A --only Style/RedundantParentheses

https://github.com/rubygems/rubygems/commit/295691d4dc
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 13:40:35 +09:00
parent b8914a9d5d
commit 4ab23df2c4
5 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class Gem::Ext::Builder
RbConfig::CONFIG["configure_args"] =~ /with-make-prog\=(\w+)/
make_program_name = ENV["MAKE"] || ENV["make"] || $1
unless make_program_name
make_program_name = (RUBY_PLATFORM.include?("mswin")) ? "nmake" : "make"
make_program_name = RUBY_PLATFORM.include?("mswin") ? "nmake" : "make"
end
make_program = Shellwords.split(make_program_name)

View File

@ -114,7 +114,7 @@ class Gem::RemoteFetcher
cache_dir =
if Dir.pwd == install_dir # see fetch_command
install_dir
elsif File.writable?(install_cache_dir) || (File.writable?(install_dir) && (!File.exist?(install_cache_dir)))
elsif File.writable?(install_cache_dir) || (File.writable?(install_dir) && !File.exist?(install_cache_dir))
install_cache_dir
else
File.join Gem.user_dir, "cache"

View File

@ -10,7 +10,7 @@ class Gem::S3URISigner
end
def to_s # :nodoc:
(super).to_s
super.to_s
end
end
@ -20,7 +20,7 @@ class Gem::S3URISigner
end
def to_s # :nodoc:
(super).to_s
super.to_s
end
end

View File

@ -282,7 +282,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
]
names.each do |name|
newname, prefix = @tar_writer.split_name(name)
assert(!(newname.empty?), "split_name() returned empty name")
assert(!newname.empty?, "split_name() returned empty name")
assert(newname.bytesize <= 100, "split_name() returned name longer than 100 bytes: '#{newname}' for '#{name}'")
assert(prefix.bytesize <= 155, "split_name() returned prefix longer than 155 bytes: '#{prefix}' for '#{name}'")
newname = [prefix, newname].join("/") unless prefix.empty?

View File

@ -1199,7 +1199,7 @@ dependencies: []
s.version = "1"
end
spec.instance_variable_set :@licenses, (class << (Object.new);self;end)
spec.instance_variable_set :@licenses, (class << Object.new;self;end)
spec.loaded_from = "/path/to/file"
e = assert_raise Gem::FormatException do