Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Source#cache_dir
cache_dir(uri)
lib/rubygems/source.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/source.rb, line 103
def cache_dir(uri)
# Correct for windows paths
escaped_path = uri.path.sub(%r{^/([a-z]):/}i, '/\\1-/')
File.join Gem.spec_cache_dir, "#{uri.host}%#{uri.port}", File.dirname(escaped_path)
end
Returns the local directory to write uri to.
See also
#<=>
#compact_index_cache_dir
.new
#compact_index_info_rows
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0