module ActiveSupport::DescendantsTracker

def accumulate_descendants(klass, acc)

def accumulate_descendants(klass, acc)
  if direct_descendants = @@direct_descendants[klass]
    direct_descendants.each do |direct_descendant|
      acc << direct_descendant
      accumulate_descendants(direct_descendant, acc)
    end
  end
end