Maintenance Ruby 3.3 gets fixes, but no new features. 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.3.0/lib/rubygems/basic_specification.rb, line 175
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.