From: "dgutov (Dmitry Gutov)" Date: 2022-01-20T22:46:31+00:00 Subject: [ruby-core:107214] [Ruby master Feature#14394] Class.descendants Issue #14394 has been updated by dgutov (Dmitry Gutov). Shouldn't the `#descendants` method be the reverse of `#ancestors`? `#ancestors` traverses up both class hierarchies and module inclusion chains. That tells me both `Module#descendants` and `Class#descendants` will make sense, and should enumerate both classes and modules that are either derived from the current class, or include the current module (...and descendants of such classes/modules as well). ---------------------------------------- Feature #14394: Class.descendants https://bugs.ruby-lang.org/issues/14394#change-96075 * Author: ridiculous (Ryan Buckley) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) ---------------------------------------- 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: