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#have_file?
have_file?(file, suffixes)
lib/rubygems/basic_specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/basic_specification.rb, line 332
def have_file?(file, suffixes)
return true if raw_require_paths.any? do |path|
base = File.join(gems_dir, full_name, path.tap(&Gem::UNTAINT), file).tap(&Gem::UNTAINT)
suffixes.any? {|suf| File.file? base + suf }
end
if have_extensions?
base = File.join extension_dir, file
suffixes.any? {|suf| File.file? base + suf }
else
false
end
end
No documentation available
See also
#have_extensions?
#lib_dirs_glob
#gems_dir
#matches_for_glob
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0