summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/config_file.rb2
-rw-r--r--lib/rubygems/update_suggestion.rb5
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