Method: Bundler::PubGrub::VersionConstraint#union

Defined in:
lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb

#union(other) ⇒ Object

[View source]

51
52
53
54
55
56
57
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb', line 51

def union(other)
  unless package == other.package
    raise ArgumentError, "Can only intersect between VersionConstraint of the same package"
  end

  self.class.new(package, range: range.union(other.range))
end