diff options
author | Xavier Noria <fxn@hashref.com> | 2010-01-26 22:46:47 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-01-26 22:46:47 +0100 |
commit | 245bfafe335ff883f7a096eab95ac22fe2848679 (patch) | |
tree | 29032c5a862311edbcdbad6c7b1841c60ad835a5 /activesupport/lib/active_support/core_ext | |
parent | 5b01c8bb8bd9354fda8dc00c2df6888dbab7f017 (diff) | |
download | rails-245bfafe335ff883f7a096eab95ac22fe2848679.tar.gz rails-245bfafe335ff883f7a096eab95ac22fe2848679.tar.bz2 rails-245bfafe335ff883f7a096eab95ac22fe2848679.zip |
removes unused Object#subclasses_of
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/extending.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index e1aed3fc3c..5a375f39ad 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -36,18 +36,6 @@ class Class end class Object - # Exclude this class unless it's a subclass of our supers and is defined. - # We check defined? in case we find a removed class that has yet to be - # garbage collected. This also fails for anonymous classes -- please - # submit a patch if you have a workaround. - def subclasses_of(*superclasses) #:nodoc: - subclasses = [] - superclasses.each do |klass| - subclasses.concat klass.descendents.select {|k| k.name.blank? || k.reachable?} - end - subclasses - end - def extended_by #:nodoc: ancestors = class << self; ancestors end ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] |