lib/core/facets/class/descendents.rb in facets-2.4.5 vs lib/core/facets/class/descendents.rb in facets-2.5.0

- old
+ new

@@ -7,11 +7,10 @@ # class B < X; end # X.descendents #=> [A,B] # # NOTE: This is a intesive operation. Do not # expect it to be super fast. - def descendents subclass = [] ObjectSpace.each_object( Class ) do |c| if c.ancestors.include?( self ) and self != c subclass << c @@ -25,10 +24,9 @@ # Obvious alias for descendents. # # NOTE: ActiveSupport returns string names rather # then actual classes, so this is excluded # if ActiveSupport has already been loaded. - # alias_method :subclasses, :descendents end end