diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-03-22 13:26:37 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-03-23 17:18:49 +0900 |
commit | 0eef33e113e61f0d6efcf47f93602bd9d68f68d2 (patch) | |
tree | 1305402633da67630cf1ebfebbb6a630420108be /lib/rubygems/commands/uninstall_command.rb | |
parent | bec069b0cae3934bb2caee3aad7fbf587ab95937 (diff) |
[rubygems/rubygems] util/rubocop -A --only Style/Next
https://github.com/rubygems/rubygems/commit/e5868e92f7
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7582
Diffstat (limited to 'lib/rubygems/commands/uninstall_command.rb')
-rw-r--r-- | lib/rubygems/commands/uninstall_command.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb index 74c11dd64b..6d34dd0149 100644 --- a/lib/rubygems/commands/uninstall_command.rb +++ b/lib/rubygems/commands/uninstall_command.rb @@ -167,15 +167,14 @@ that is a dependency of an existing gem. You can use the gems_to_uninstall = {} deps.each do |dep| - unless gems_to_uninstall[dep.name] - gems_to_uninstall[dep.name] = true + next if gems_to_uninstall[dep.name] + gems_to_uninstall[dep.name] = true - unless original_gem_version[dep.name] == Gem::Requirement.default - options[:version] = dep.version - end - - uninstall_gem(dep.name) + unless original_gem_version[dep.name] == Gem::Requirement.default + options[:version] = dep.version end + + uninstall_gem(dep.name) end end |