Skip to content

Commit

Permalink
Fix DescendantsTrackerTest when ran in isolation
Browse files Browse the repository at this point in the history
Followup: #49108

DescendantsTracker need to work whether the `Class#descendants` core
ext is loaded or not. I missed that in the previous PR.
  • Loading branch information
byroot committed Sep 1, 2023
1 parent 85ea227 commit 553b44a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/descendants_tracker.rb
Expand Up @@ -107,7 +107,7 @@ def descendants(klass)
end

def descendants
subclasses = self.subclasses
subclasses = DescendantsTracker.reject!(self.subclasses)
subclasses.concat(subclasses.flat_map(&:descendants))
end
else
Expand Down

0 comments on commit 553b44a

Please sign in to comment.