summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorloadkpi <loadkpi@gmail.com>2022-01-14 09:07:39 +0300
committergit <svn-admin@ruby-lang.org>2022-01-15 14:00:35 +0900
commit7c70151aedf5b51447f7a9ebcb6a4b58ef76deb2 (patch)
tree5c14424039b6acf08133a4231b89b639e4738cb1 /lib/rubygems/commands
parent2dc365db79e46daaf415c4fcabeab540ec43e92e (diff)
[rubygems/rubygems] Fix `gem update --system` for already installed version of rubygems-update
https://github.com/rubygems/rubygems/commit/c167d513a7
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/update_command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 3714b00322..99208e5cb2 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -287,7 +287,7 @@ command to remove old versions.
check_oldest_rubygems version
installed_gems = Gem::Specification.find_all_by_name 'rubygems-update', requirement
- installed_gems = update_gem('rubygems-update', version) if installed_gems.empty?
+ installed_gems = update_gem('rubygems-update', version) if installed_gems.empty? || installed_gems.first.version != version
return if installed_gems.empty?
version = installed_gems.first.version