Tom Ward
2006-Jan-18 10:46 UTC
[Rails] subclasses_of - why does it ignore subclasses within modules?
ActiveSupport provides a method Object.subclasses_of, to give the subclasses of a given class. However, it ignores any subclass within a module, so : class A end class B < A end Object.subclasses_of(A) # returns [B] module C class D < A end end Object.subclasses_of(A) # returns [B], even though C::D is also a subclass of A class E < C::D end Object.subclasses_of(A) # returns [B, E], even though C::D isn''t returned This behaviour has been very deliberately built into the code, but seems to be plainly wrong. Can anyone provide any insight why this is so? Tom -- email : tom at popdog.net
Reasonably Related Threads
- Why does Object.subclasses_of ignore subclasses within modules?
- [LLVMdev] Question about MCExpr and subclasses
- [LLVMdev] Question about MCExpr and subclasses
- new.env does not recognize parents from subclasses of "environment"
- [LLVMdev] Question about MCExpr and subclasses