Sha256: 388ff349f7552be37b98bf2ca1a78bf0d377802b8a699b211995f82ad468903c
Contents?: true
Size: 635 Bytes
Versions: 6
Compression:
Stored size: 635 Bytes
Contents
# frozen_string_literal: true at_exit do File.open(ENV["RUBY_MEMCHECK_LOADED_FEATURES_FILE"], "w") do |f| f.write($LOADED_FEATURES.join("\n")) end # We need to remove the @_memoized instance variable from Minitest::Spec # objects because it holds a hash that contains memoized objects in `let` # blocks, this can contain objects that will be reported as a memory leak. if defined?(Minitest::Spec) require "objspace" ObjectSpace.each_object(Minitest::Spec) do |obj| if obj.instance_variable_defined?(:@_memoized) obj.remove_instance_variable(:@_memoized) end end end GC.start end
Version data entries
6 entries across 6 versions & 1 rubygems