Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::Source#update_cache?
update_cache?
lib/rubygems/source.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/rubygems/source.rb, line 111
def update_cache?
return @update_cache unless @update_cache.nil?
@update_cache =
begin
File.stat(Gem.user_home).uid == Process.uid
rescue Errno::ENOENT
false
end
end
Returns true when it is possible and safe to update the cache directory.