<commit_before># frozen_string_literal: true
require 'capybara/selector/filter_set'
require 'capybara/selector/css'
require 'xpath'

#Patch XPath to allow a nil condition in where
module XPath
  class Renderer
    def where(on, condition)
      condition = condition.to_s
      if !condition.empty?
        "#{on}[#{condition}]"
      else
        "#{on}"
      end<commit_msg>:warning: method redefined; discarding old where<commit_after># frozen_string_literal: true
require 'capybara/selector/filter_set'
require 'capybara/selector/css'
require 'xpath'

#Patch XPath to allow a nil condition in where
module XPath
  class Renderer
    undef :where if method_defined?(:where)
    def where(on, condition)
      condition = condition.to_s
      if !condition.empty?
        "#{on}[#{condition}]"
      else
        "#{on}"
      end
{'fraction_non_alphanumeric': 0.10324129651860744, 'fraction_numerical': 0.0, 'mean_word_length': 3.4838709677419355, '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': '6254242', 'n_tokens_mistral': 256, 'n_tokens_neox': 260, 'n_words': 74}