We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 837f20e commit b205dc4Copy full SHA for b205dc4
activesupport/lib/active_support/descendants_tracker.rb
@@ -95,11 +95,6 @@ def reject!(classes) # :nodoc:
95
end
96
97
98
- def descendants
99
- subclasses = self.subclasses
100
- subclasses.concat(subclasses.flat_map(&:descendants))
101
- end
102
-
103
if RubyFeatures::CLASS_SUBCLASSES
104
class << self
105
def subclasses(klass)
@@ -110,6 +105,11 @@ def descendants(klass)
110
klass.descendants
111
106
112
107
108
+
109
+ def descendants
+ subclasses = self.subclasses
+ subclasses.concat(subclasses.flat_map(&:descendants))
+ end
113
else
114
# DescendantsArray is an array that contains weak references to classes.
115
# Note: DescendantsArray is redundant with WeakSet, however WeakSet when used
0 commit comments