> -----Original Message-----
> From: Charles.O.Nutter / sun.com=20
> [mailto:Charles.O.Nutter / sun.com] On Behalf Of Charles Oliver Nutter
> Sent: Tuesday, September 23, 2008 12:22 PM
> To: ruby-core / ruby-lang.org
> Subject: [ruby-core:18813] Feature idea: Class#subclasses
>=20
> In JRuby we have added an extension that provides a=20
> "subclasses" method on Class:
>=20
> require 'jruby/core_ext'
> p Numeric.subclasses # =3D> [Integer, Float]
>=20
> Originally this was not an exposed capability, and was just=20
> used to provide the functionality of=20
> ObjectSpace.each_object(Class) without actually having=20
> ObjectSpace. But each_object(Class) walks all classes, when=20
> most cases want a specific subset of classes (like test/unit=20
> looking for TestCase subclasses). So it seems like=20
> Class#subclasses is a needed feature.
>=20
> What do you all think of this feature? I think it should be=20
> considered for adding to Ruby proper. Shall I submit=20
> something in Redmine for this?=20
> Any thoughts on correct behavior?

Seems alright to me. I prefer "descendants", though, as an antonym to
"ancestors". :)
=20
Regards,

Dan


This communication is the property of Qwest and may contain confidential =
or
privileged information. Unauthorized use of this communication is =
strictly=20
prohibited and may be unlawful.  If you have received this communication =

in error, please immediately notify the sender by reply e-mail and =
destroy=20
all copies of the communication and any attachments.