This question is similar / related to another stack overflow question about Looking up all the descendants of a class in Ruby. A wonderful question full of the information that I was looking for - except that when I drop down into a rails console:
irb(main):001:0> ActiveSupport::DescendantsTracker.descendants(Object)
=>[]
irb(main):002:0> ObjectSpace.each_object(Class).select { |klass| klass < Object }
=> [IRB::Notifier::AbstractNotifier, IRB::Notifier::ErrUnrecognizedLevel, ...]
So, why isn't ActiveSupport::DescendantsTracker returning the descendants of Object? What are the differences in the implementation? The documentation for DescendantsTracker suggests that:
This module provides an internal implementation to track descendants which is faster than iterating through ObjectSpace.
Faster? Ok, it's gotta be faster to return nothing versus something (right?), but it's supposed to return the descendants of the supplied class.