Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::SpecificationRecord#find_inactive_by_path
find_inactive_by_path(path)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification_record.rb, line 212
def find_inactive_by_path(path)
stub = stubs.find do |s|
next if s.activated?
s.contains_requirable_file? path
end
stub&.to_spec
end
Return the best specification in the record that contains the file matching path amongst the specs that are not activated.