On Sun, Jan 17, 2010 at 1:54 AM, Michael Koziarski <[email protected]> wrote:
>> Ah, but they are not equivalent because AC::Base#subclasses includes >> names of non-reachable class objects, whereas Class#subclasses filters >> them out. > > This difference is probably just to enable reset_subclasses to work > around the ruby memory-leak discussed at length on: > > http://rails.lighthouseapp.com/projects/8994/tickets/1339-arbase-should-not-be-nuking-its-children-just-because-it-lost-interest > > There's no reason that the AR version can't be called something else > and move subclasses to be the same everywhere. I've seen that the classes in the framework that need #subclasses implement their own version using the inherited hook. It turns out that Class#subclasses was not being used in the framework, Jeremy suggested it shouldn't be a core extension in that case and we've removed it. That in turn unrolled a series of related utilities that were unused, they are: Object#subclasses_of Object#remove_subclasses_of Object#extended_by Object#extend_with_included_modules_from Class#remove_subclasses Class#remove_class Class#reachable? Class#descedents They are gone as well, and I'll prepare a patch to deprecate them for 2.3. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
