mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Add Class#descendants
Doesn't include receiver or singleton classes. Implements [Feature #14394] Co-authored-by: fatkodima <fatkodima123@gmail.com> Co-authored-by: Benoit Daloze <eregontp@gmail.com>
This commit is contained in:
parent
a4d5ee4f31
commit
717ab0bb2e
Notes:
git
2021-10-27 04:35:44 +09:00
Merged: https://github.com/ruby/ruby/pull/4974 Merged-By: jeremyevans <code@jeremyevans.net>
6 changed files with 122 additions and 0 deletions
1
object.c
1
object.c
|
@ -4653,6 +4653,7 @@ InitVM_Object(void)
|
|||
rb_define_method(rb_cClass, "new", rb_class_new_instance_pass_kw, -1);
|
||||
rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);
|
||||
rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0);
|
||||
rb_define_method(rb_cClass, "descendants", rb_class_descendants, 0); /* in class.c */
|
||||
rb_define_alloc_func(rb_cClass, rb_class_s_alloc);
|
||||
rb_undef_method(rb_cClass, "extend_object");
|
||||
rb_undef_method(rb_cClass, "append_features");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue