module Bundler::VersionRanges
def self.empty?(ranges, neqs)
def self.empty?(ranges, neqs) !ranges.reduce(ReqR::UNIVERSAL) do |last_range, curr_range| next false unless last_range next false if curr_range.single? && neqs.include?(curr_range.left.version) next curr_range if last_range.right.version == ReqR::INFINITY case last_range.right.version <=> curr_range.left.version # higher when 1 then next ReqR.new(curr_range.left, last_range.right) # equal when 0 if last_range.right.inclusive && curr_range.left.inclusive && !neqs.include?(curr_range.left.version) ReqR.new(curr_range.left, [curr_range.right, last_range.right].max) end # lower when -1 then next false end end end