From: eregontp@... Date: 2020-09-25T14:01:27+00:00 Subject: [ruby-core:100147] [Ruby master Feature#14394] Class.descendants Issue #14394 has been updated by Eregon (Benoit Daloze). byroot (Jean Boussier) wrote in #note-20: > I'm not sure `Module#descendants` is really useful, but I don't see any reason not to have it either. I think tracking subclasses (of classes) is quite simpler than also having to track "which modules include a given module". Is there a use-case for `mod.descendants` where `mod` is a module and not a class? If not I'd suggest to restrict it to Class#descendants for now. ---------------------------------------- Feature #14394: Class.descendants https://bugs.ruby-lang.org/issues/14394#change-87722 * Author: ridiculous (Ryan Buckley) * Status: Feedback * Priority: Normal ---------------------------------------- There have been numerous implementations of the method Class.descendants by various gems. However, I can't help but think that this ability should be included in the Ruby language itself. Especially since Ruby already offers the counterpart method Class.ancestors. Would it possible to add a `descendants` class method? -- https://bugs.ruby-lang.org/ Unsubscribe: