Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::BasicSpecification#contains_requirable_file?
contains_requirable_file?(file)
lib/rubygems/basic_specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/rubygems/basic_specification.rb, line 73
def contains_requirable_file?(file)
if @ignored
return false
elsif missing_extensions?
@ignored = true
if platform == Gem::Platform::RUBY || Gem::Platform.local === platform
warn "Ignoring #{full_name} because its extensions are not built. " \
"Try: gem pristine #{name} --version #{version}"
end
return false
end
is_soext = file.end_with?(".so", ".o")
if is_soext
have_file? file.delete_suffix(File.extname(file)), Gem.dynamic_library_suffixes
else
have_file? file, Gem.suffixes
end
end
Return true if this spec can require file.