Preview Ruby 4.1 is a preview. It can change before the final release. 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-4.1.0-preview1/lib/rubygems/basic_specification.rb, line 201
def to_fullpath(path)
if activated?
@paths_map ||= {}
Gem.suffixes.each do |suf|
full_require_paths.each do |dir|
fullpath = "#{dir}/#{path}#{suf}"
next unless File.file?(fullpath)
@paths_map[path] ||= fullpath
end
end
@paths_map[path]
end
end
Full path of the target library file. If the file is not in this gem, return nil.