From 5d21676aaabf42a50e565c13c8c3c31d45627511 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 27 Jan 2010 22:15:37 +0100 Subject: AS guide: Class#subclasses has been removed in ec7c642f5fe60afc857aa64f1a9b4c2be56f9d70 --- .../source/active_support_core_extensions.textile | 29 ---------------------- 1 file changed, 29 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 12ce05204f..562bc76135 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -587,35 +587,6 @@ If for whatever reason an application loads the definition of a mailer class and NOTE: Defined in +active_support/core_ext/class/delegating_attributes.rb+. -h4. Descendants - -h5. +subclasses+ - -The +subclasses+ method returns the names of all the anonymous or reachable descendants of its receiver as an array of strings: - - -class C; end -C.subclasses # => [] - -Integer.subclasses # => ["Bignum", "Fixnum"] - -module M - class A; end - class B1 < A; end - class B2 < A; end -end - -module N - class C < M::B1; end -end - -M::A.subclasses # => ["N::C", "M::B2", "M::B1"] - - -WARNING: +ActiveRecord::Base+ redefines +subclasses+, it returns class objects, reachable or not, and it is protected. - -NOTE: Defined in +active_support/core_ext/class/removal.rb+. - h3. Extensions to +String+ h4. +squish+ -- cgit v1.2.3