<commit_before># frozen_string_literal: true

at_exit { GC.start }

require "minitest/autorun"
require "liquid/c"

if GC.respond_to?(:verify_compaction_references)
  # This method was added in Ruby 3.0.0. Calling it this way asks the GC to
  # move objects around, helping to find object movement bugs.
  begin
    GC.verify_compaction_references(double_heap: true, toward: :empty)
  rescue NotImplementedError
    puts "W: GC compaction not suppported by platform"
  end
end

# Enable auto-compaction in the GC if supported.
if GC.respond_to?(:auto_compact=)
  GC.auto_compact = true
end

GC.stress = true if ENV["GC_STRESS"]<commit_msg>Remove GC.start required by ruby_memcheck<commit_after># frozen_string_literal: true

require "minitest/autorun"
require "liquid/c"

if GC.respond_to?(:verify_compaction_references)
  # This method was added in Ruby 3.0.0. Calling it this way asks the GC to
  # move objects around, helping to find object movement bugs.
  begin
    GC.verify_compaction_references(double_heap: true, toward: :empty)
  rescue NotImplementedError
    puts "W: GC compaction not suppported by platform"
  end
end

# Enable auto-compaction in the GC if supported.
if GC.respond_to?(:auto_compact=)
  GC.auto_compact = true
end

GC.stress = true if ENV["GC_STRESS"]
{'fraction_non_alphanumeric': 0.0811232449297972, 'fraction_numerical': 0.0046801872074883, 'mean_word_length': 4.676991150442478, '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': '1160456', 'n_tokens_mistral': 431, 'n_tokens_neox': 421, 'n_words': 137}