End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::BasicSpecification#to_fullpath
to_fullpath(path)
lib/rubygems/basic_specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/basic_specification.rb, line 170
def to_fullpath(path)
if activated?
@paths_map ||= {}
@paths_map[path] ||=
begin
fullpath = nil
suffixes = Gem.suffixes
suffixes.find do |suf|
full_require_paths.find do |dir|
File.file?(fullpath = "#{dir}/#{path}#{suf}")
end
end ? fullpath : nil
end
else
nil
end
end
Full path of the target library file. If the file is not in this gem, return nil.