Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::Specification#has_conflicts?
has_conflicts?
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/rubygems/specification.rb, line 1727
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
#full_name
#invalidate_memoized_attributes
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0