mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
68e9df0257
Since `#subclasses` was introduced a bit after `#descendants`, the feature testing code assumed that if the former was present, the later would be too. However it was decided to revert `#descendants` for now, but to keep `#subclasses` https://bugs.ruby-lang.org/issues/14394#note-33 Since this was totally unexpected, the `#descendants` core_ext and `DescendantsTracker#descendants` are broken on Active Support 7.0.0 / Ruby 3.1.0-dev. We now test the existence of both methods to handle this new situation. Since for now it's planned for `#descendants` to make it back in Ruby 3.2, we keep checking for it.
435 B
435 B
-
Fix
Class#descendants
andDescendantsTracker#descendants
compatibility with Ruby 3.1.The native
Class#descendants
was reverted prior to Ruby 3.1 release, butClass#subclasses
was kept, breaking the feature detection.Jean Boussier
Please check 7-0-stable for previous changes.