diff options
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 |