Preview Ruby 4.1 is a preview. It can change before the final release. 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-4.1.0-preview1/lib/rubygems/basic_specification.rb, line 376
def have_file?(file, suffixes)
return true if raw_require_paths.any? do |path|
base = File.join(gems_dir, full_name, path, file)
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