class Capybara::Selector::RegexpDisassembler
def remove_and_covered(strings)
def remove_and_covered(strings) # delete_if is documented to modify the array after every block iteration - this doesn't appear to be true # uniq the strings to prevent identical strings from removing each other strings.uniq! # If we have "ab" and "abcd" required - only need to check for "abcd" strings.delete_if do |sub_string| strings.any? do |cover_string| next if sub_string.equal? cover_string cover_string.include?(sub_string) end end end