From: "ko1 (Koichi Sasada)" <noreply@...>
Date: 2021-12-03T03:13:32+00:00
Subject: [ruby-core:106433] [Ruby master Feature#14394] Class.descendants

Issue #14394 has been updated by ko1 (Koichi Sasada).


Note:

The internal implementation of subclass iteration seems fragile (difficult to maintain) because it needs to manage with weakref. In fact, our CI shows SEGV in a few times in years (difficult to debug because of its rareness. But we can ignore these bug because it is rare :p).
So personally I don't want to introduce this feature if the feature is not important.

(if this feature is important for Ruby langauge, I think it is better to re-implement with other easy data structures)

----------------------------------------
Feature #14394: Class.descendants
https://bugs.ruby-lang.org/issues/14394#change-95076

* Author: ridiculous (Ryan Buckley)
* Status: Closed
* 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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>