<commit_before>
require 'muack/mock'
require 'muack/stub'
require 'muack/any_instance_of'

module Muack
  class Session < Hash
    def mock obj; self["mk #{obj.__id__}"] ||= Mock.new(obj); end
    def stub obj; self["sb #{obj.__id__}"] ||= Stub.new(obj); end

    def any_instance_of kls
      (@others ||= {})["ai #{kls.__id__}"] ||= AnyInstanceOf.new(kls)
    end

    def verify
      each_value.all?(&:__mock_verify)
    end

    def reset
      each_value(&:__mock_reset)
      clear
    end
  end
end
<commit_msg>clear the other data as well<commit_after>
require 'muack/mock'
require 'muack/stub'
require 'muack/any_instance_of'

module Muack
  class Session < Hash
    def mock obj; self["mk #{obj.__id__}"] ||= Mock.new(obj); end
    def stub obj; self["sb #{obj.__id__}"] ||= Stub.new(obj); end

    def any_instance_of kls
      (@others ||= {})["ai #{kls.__id__}"] ||= AnyInstanceOf.new(kls)
    end

    def verify
      each_value.all?(&:__mock_verify)
    end

    def reset
      instance_variable_defined?(:@others) && @others.clear
      each_value(&:__mock_reset)
      clear
    end
  end
end

{'fraction_non_alphanumeric': 0.14645103324348607, 'fraction_numerical': 0.0, 'mean_word_length': 3.2196969696969697, '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': '878177', 'n_tokens_mistral': 407, 'n_tokens_neox': 404, 'n_words': 97}