# File lib/semantic_puppet/version_range.rb, line 283
    def intersection(other)
      raise NOT_A_VERSION_RANGE unless other.kind_of?(VersionRange)

      if self.begin < other.begin
        return other.intersection(self)
      end

      unless include?(other.begin) || other.include?(self.begin)
        return EMPTY_RANGE
      end

      endpoint = ends_before?(other) ? self : other
      VersionRange.new(self.begin, endpoint.end, endpoint.exclude_end?)
    end