Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Specification#spec_dir
spec_dir
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification.rb, line 2343
def spec_dir
@spec_dir ||= if loaded_from && Gem::ContentAddress.content_addressed?(self)
File.dirname loaded_from
else
Gem::SpecificationRecord.specification_dir_for(self, base_dir)
end
end
Full path to the directory containing this spec’s gemspec file. ABI-scoped for content-addressed specs.
See also
#sort_obj
#spec_file
#satisfies_requirement?
#spec_name
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0