Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Source#update_cache?
update_cache?
lib/rubygems/source.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/source.rb, line 113
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.