Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Source#compact_index_cache_dir
compact_index_cache_dir(index_uri)
lib/rubygems/source.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/source.rb, line 466
def compact_index_cache_dir(index_uri)
if update_cache?
# Correct for windows paths
escaped_path = index_uri.path.sub(%r{^/([a-z]):/}i, '/\\1-/')
File.join Gem.spec_cache_dir, "compact_index",
"#{index_uri.host}%#{index_uri.port}", *escaped_path.split("/").reject(&:empty?)
else
require "tmpdir"
require "fileutils"
dir = Dir.mktmpdir "gem_compact_index"
at_exit { FileUtils.rm_rf dir }
dir
end
end
No documentation available