<commit_before>module Password; refine String do
  def confusing?
    match?(/i|o|l/)
  end

  def ascending?
    each_char.each_cons(3).any? { |a, b, c| b.ord - 1 == a.ord && c.ord - 2 == a.ord }
  end<commit_msg>day 11: Use regex for ascending<commit_after>module Password
  ASCEND = Regexp.union(*(?a..?z).each_cons(3).map(&:join))
end

module Password; refine String do
  def confusing?
    match?(/i|o|l/)
  end

  def ascending?
    match?(ASCEND)
  end
{'fraction_non_alphanumeric': 0.1568627450980392, 'fraction_numerical': 0.013071895424836602, 'mean_word_length': 3.339622641509434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5345855', 'n_tokens_mistral': 188, 'n_tokens_neox': 173, 'n_words': 44}