Maintenance Ruby 3.3 gets fixes, but no new features. 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-3.3.0/lib/rubygems/source.rb, line 101
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.