<commit_before>module DynamicSitemaps
  class Generator
    # Generates the sitemap(s) and index based on the configuration file specified in DynamicSitemaps.config_path.
    # If you supply a block, that block is evaluated instead of the configuration file.
    def generate(&block)
      if block
        instance_eval &block
      else
        instance_eval open(DynamicSitemaps.config_path).read
      end
      generate_index
      ping_search_engines
    end
<commit_msg>Use file path for instance_eval to get correct stack traces<commit_after>module DynamicSitemaps
  class Generator
    # Generates the sitemap(s) and index based on the configuration file specified in DynamicSitemaps.config_path.
    # If you supply a block, that block is evaluated instead of the configuration file.
    def generate(&block)
      if block
        instance_eval &block
      else
        instance_eval open(DynamicSitemaps.config_path).read, DynamicSitemaps.config_path
      end
      generate_index
      ping_search_engines
    end

{'fraction_non_alphanumeric': 0.038872691933916424, 'fraction_numerical': 0.0, 'mean_word_length': 3.256198347107438, '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': '3202193', 'n_tokens_mistral': 278, 'n_tokens_neox': 270, 'n_words': 98}