aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/update_suggestion.rb
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2022-11-04 22:56:31 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-11-11 17:24:08 +0900
commitde159c5a855dd53bfd9ce284c9099306724560a7 (patch)
tree5e184f264bb1930a14aa7db4f487828ef70788b7 /lib/rubygems/update_suggestion.rb
parent7ce0f81fbbd9c2b35e9fe35f5ef040626e284a88 (diff)
downloadruby-de159c5a855dd53bfd9ce284c9099306724560a7.tar.gz
[rubygems/rubygems] Store last check even when upgrade is not available and fix test.
https://github.com/rubygems/rubygems/commit/bcffc2b0a5
Diffstat (limited to 'lib/rubygems/update_suggestion.rb')
-rw-r--r--lib/rubygems/update_suggestion.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rubygems/update_suggestion.rb b/lib/rubygems/update_suggestion.rb
index d9ac517e49..c2e81b2374 100644
--- a/lib/rubygems/update_suggestion.rb
+++ b/lib/rubygems/update_suggestion.rb
@@ -53,10 +53,11 @@ Run `gem update --system #{Gem.latest_rubygems_version}` to update your installa
# compare current and latest version, this is the part where
# latest rubygems spec is fetched from remote
- if (Gem.rubygems_version < Gem.latest_rubygems_version)
+ (Gem.rubygems_version < Gem.latest_rubygems_version).tap do |eglible|
# store the time of last successful check into state file
Gem.configuration.last_update_check = check_time
- return true
+
+ return eglible
end
rescue # don't block install command on any problem
false