code: def matches(regexp, word)
        if regexp.respond_to?(:match?)
          regexp.match?(word)
        else
          regexp.match(word)
        end
      end
docs: `match?` was added in Ruby 2.4 this allows us to be backwards
   compatible with older Ruby versions