Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Specification#has_conflicts?
has_conflicts?
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification.rb, line 1699
def has_conflicts?
return true unless Gem.env_requirement(name).satisfied_by?(version)
runtime_dependencies.any? do |dep|
spec = Gem.loaded_specs[dep.name]
spec && !spec.satisfies_requirement?(dep)
end
rescue ArgumentError => e
raise e, "#{name} #{version}: #{e.message}"
end
Return true if there are possible conflicts against the currently loaded specs.
See also
#gems_dir
#initialize_copy
#for_cache
#keep_only_files_and_directories
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0