Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::SpecificationRecord.specification_dir_for
specification_dir_for(spec, base_dir)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification_record.rb, line 29
def self.specification_dir_for(spec, base_dir)
dir = File.join(base_dir, "specifications")
dir = File.join(dir, spec.ruby_abi) if Gem::ContentAddress.content_addressed?(spec)
dir
end
The spec dir for spec under base_dir: the ABI-scoped subdir for content-addressed specs, the flat specifications dir otherwise.