summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-12-21 10:04:15 +0100
committergit <svn-admin@ruby-lang.org>2021-12-27 21:32:32 +0900
commitdd022c1f768d4e633f047ec140474b985736ccc9 (patch)
tree320c24556f0f92c56607a6f3dd3cab15702e28d7
parent56a0f34d318b84d9da11b2be5c0a35a1e27d417f (diff)
[rubygems/rubygems] Don't redownload `rubygems-update` package if already there
This makes it easier to test the upgrade process locally and should be more efficient in certain cases where the user has already upgraded in the past. https://github.com/rubygems/rubygems/commit/ed6cc88494
-rw-r--r--lib/rubygems/commands/update_command.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 513351d303..a78f29427f 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -286,9 +286,8 @@ command to remove old versions.
check_oldest_rubygems version
- update_gem 'rubygems-update', version
-
installed_gems = Gem::Specification.find_all_by_name 'rubygems-update', requirement
+ installed_gems = update_gem('rubygems-update', version) if installed_gems.empty?
version = installed_gems.first.version
install_rubygems version