Issue #14394 has been updated by Hanmac (Hans Mackowiak).


"Class#inherited hook" works not for core classes because they are defined before you can define the hook

also should that show only named classes or anonymous somehow too?

@ridiculous: i often see a register method where you register your new class onto a name/key to that handler service

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

* Author: ridiculous (Ryan Buckley)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
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>