diff options
author | Josef Šimánek <josef.simanek@gmail.com> | 2022-11-04 22:56:31 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-11-11 17:24:08 +0900 |
commit | de159c5a855dd53bfd9ce284c9099306724560a7 (patch) | |
tree | 5e184f264bb1930a14aa7db4f487828ef70788b7 /lib | |
parent | 7ce0f81fbbd9c2b35e9fe35f5ef040626e284a88 (diff) |
[rubygems/rubygems] Store last check even when upgrade is not available and fix test.
https://github.com/rubygems/rubygems/commit/bcffc2b0a5
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6715
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/config_file.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/update_suggestion.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index f2abc7f2af..4aa8b4d33a 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -392,7 +392,7 @@ if you believe they were disclosed to a third party. # The name of the state file. def state_file_name - @state_file_name || Gem.state_file + Gem.state_file end # Reads time of last update check from state file 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 |