I have the following method to gather a list of subclasses. For various reasons I can't use ActiveSupport DescendantsTracker
.
def self.descendants
unless @subclasses
@subclasses = []
ObjectSpace.each_object(Class) do |subclass|
if subclass < self # && other conditions
@subclasses << subclass.to_s.split('::').last
end
end
end
@subclasses
end
With upgrade to ruby 2.3.1 (which might not be related though), the list started to intermittently contain also values not seen before, like this
"#<Class:#<FairPlay::TLLV::ProtocolVersionsSupported:0x00000003566730>>"
The first question would be what does this denote? I'd be thankfull for pointer to start with.
Re the intermittency - this only comes up in the tests (RSpec) and only if the test case is not ran separately. So I suspect RSpec, but still would like to know what's behind.
Thanks!