<commit_before>module V
  class Worker < Thread
    class Group < ThreadGroup
      include Singleton

      def enclose
        super

        list.
          each { |worker| worker.stop! }.
          each { |worker| worker.join }
      end

      at_exit {
        if defined? Test::Unit
          unless $! or Test::Unit.respond_to?(:run?) && Test::Unit.run?
            test_result = Test::Unit::AutoRunner.run
            instance.enclose
            exit test_result
          end
        else
          instance.enclose
        end<commit_msg>Check for Test::Unit::AutoRunner instead of Test::Unit.<commit_after>module V
  class Worker < Thread
    class Group < ThreadGroup
      include Singleton

      def enclose
        super

        list.
          each { |worker| worker.stop! }.
          each { |worker| worker.join }
      end

      at_exit {
        if defined? Test::Unit::AutoRunner
          unless $! or Test::Unit.respond_to?(:run?) && Test::Unit.run?
            test_result = Test::Unit::AutoRunner.run
            instance.enclose
            exit test_result
          end
        else
          instance.enclose
        end
{'fraction_non_alphanumeric': 0.08752166377816291, 'fraction_numerical': 0.0, 'mean_word_length': 1.643020594965675, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5582518', 'n_tokens_mistral': 316, 'n_tokens_neox': 309, 'n_words': 80}