<commit_before>require 'abstract_unit'
require 'active_support/core_ext/kernel/concern'

class KernelConcernTest < ActiveSupport::TestCase
  def test_may_be_defined_at_toplevel
    mod = ::TOPLEVEL_BINDING.eval 'concern(:ToplevelConcern) { }'
    assert_equal mod, ::ToplevelConcern
    assert_kind_of ActiveSupport::Concern, ::ToplevelConcern
    assert !Object.ancestors.include?(::ToplevelConcern), mod.ancestors.inspect
    Object.send :remove_const, :ToplevelConcern
  end
end
<commit_msg>Move test teardown into `ensure` block.<commit_after>require 'abstract_unit'
require 'active_support/core_ext/kernel/concern'

class KernelConcernTest < ActiveSupport::TestCase
  def test_may_be_defined_at_toplevel
    mod = ::TOPLEVEL_BINDING.eval 'concern(:ToplevelConcern) { }'
    assert_equal mod, ::ToplevelConcern
    assert_kind_of ActiveSupport::Concern, ::ToplevelConcern
    assert_not Object.ancestors.include?(::ToplevelConcern), mod.ancestors.inspect
  ensure
    Object.send :remove_const, :ToplevelConcern
  end
end

{'fraction_non_alphanumeric': 0.0935672514619883, 'fraction_numerical': 0.0, 'mean_word_length': 6.442028985507246, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6640669', 'n_tokens_mistral': 360, 'n_tokens_neox': 347, 'n_words': 58}