diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-03-16 14:05:21 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-03-17 18:50:55 +0900 |
commit | be4cc74e26d463358c121820fb6f918b9b8de92d (patch) | |
tree | 6ff1a172deef30bd61d448c048252b8e9313341d | |
parent | ee7475734fa7717512f26c9c0bcf7500e7456539 (diff) |
[rubygems/rubygems] util/rubocop -A --only Style/IfUnlessModifierOfIfUnless
https://github.com/rubygems/rubygems/commit/97e0af2518
-rw-r--r-- | lib/rubygems/commands/update_command.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/validator.rb | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index d1c0a32ece..837972a8e7 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -185,7 +185,9 @@ command to remove old versions. system Gem.ruby, "--disable-gems", "setup.rb", *args end - say "RubyGems system software updated" if installed unless options[:silent] + unless options[:silent] + say "RubyGems system software updated" if installed + end end end diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 7aa76b40f6..8d2a14ffee 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1136,7 +1136,9 @@ class Gem::Specification < Gem::BasicSpecification result = {} specs.reverse_each do |spec| - next if spec.version.prerelease? unless prerelease + unless prerelease + next if spec.version.prerelease? + end result[spec.name] = spec end diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb index a288eaaae1..76a6d7909e 100644 --- a/lib/rubygems/validator.rb +++ b/lib/rubygems/validator.rb @@ -62,7 +62,9 @@ class Gem::Validator errors = Hash.new {|h,k| h[k] = {} } Gem::Specification.each do |spec| - next unless gems.include? spec.name unless gems.empty? + unless gems.empty? + next unless gems.include? spec.name + end next if spec.default_gem? gem_name = spec.file_name |