spec/shared/mock.rb
# Simulate garbage collection of the objects passed in as arguments. If no objects
# are specified, all objects will be reclaimed.
Simulate garbage collection of the objects passed in as arguments. If no objects
are specified, all objects will be reclaimed.
Simulate garbage collection of the objects passed in as arguments . If no objects are specified all objects will be reclaimed .
def gc(*objects)
        objects = if objects.empty?
          object_space.keys
        else
          objects.map { |obj| obj.__id__ }
        end
        objects.each do |id|
          finalizers = object_space.delete(id)
          if finalizers
            finalizers.each{|finalizer| finalizer.call(id)}
          end
        end
      end
def gc ( * objects ) objects = if objects . empty? object_space . keys else objects . map { | obj | obj . __id__ } end objects . each do | id | finalizers = object_space . delete ( id ) if finalizers finalizers . each { | finalizer | finalizer . call ( id ) } end end end
Simulate garbage collection of the objects passed in as arguments.
Simulate garbage collection of the objects passed in as arguments .
objects
<not_specific>