End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::Specification.find_by_path
find_by_path(path)
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/specification.rb, line 1027
def self.find_by_path(path)
path = path.dup.freeze
spec = @@spec_with_requirable_file[path] ||= (stubs.find do |s|
s.contains_requirable_file? path
end || NOT_FOUND)
spec.to_spec
end
Return the best specification that contains the file matching path.
See also
.find_by_name
.find_inactive_by_path
.find_all_by_name
.find_in_unresolved
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0