class Capybara::Selector::RegexpDisassembler
def remove_or_covered(or_series)
def remove_or_covered(or_series) # If we are going to match `("a" and "b") or ("ade" and "bce")` it only makes sense to match ("a" and "b") # Ensure minimum sets of strings are being or'd or_series.each { |strs| remove_and_covered(strs) } # Remove any of the alternated string series that fully contain any other string series or_series.delete_if do |and_strs| or_series.any? do |and_strs2| next if and_strs.equal? and_strs2 remove_and_covered(and_strs + and_strs2) == and_strs end end end