<commit_before>module Mongoid
  module I18n
    class LocalizedCriteria < Mongoid::Criteria
      def where(selector = nil)
        case selector
        when String
          @selector.update("$where" => selector)
        else
          @selector.update(selector ? selector.expand_complex_criteria : {})
          expand_localized_fields_in_selector if @selector.is_a?(Hash)
        end
        self<commit_msg>LocalizedCriteria where() method is way simpler now<commit_after>module Mongoid
  module I18n
    class LocalizedCriteria < Mongoid::Criteria
      def where(selector = nil)
        super
        expand_localized_fields_in_selector if selector.is_a?(Hash)
        self
{'fraction_non_alphanumeric': 0.06911764705882353, 'fraction_numerical': 0.0058823529411764705, 'mean_word_length': 2.8914285714285715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '3384345', 'n_tokens_mistral': 184, 'n_tokens_neox': 184, 'n_words': 44}