diff options
author | Xavier Noria <fxn@hashref.com> | 2010-01-26 22:48:21 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-01-26 22:48:21 +0100 |
commit | f85f5dfc8ffefff174b695c6363211d342f77a57 (patch) | |
tree | c0631117da9f97bb7a2dab1a36424897042afbee /activesupport/lib | |
parent | 245bfafe335ff883f7a096eab95ac22fe2848679 (diff) | |
download | rails-f85f5dfc8ffefff174b695c6363211d342f77a57.tar.gz rails-f85f5dfc8ffefff174b695c6363211d342f77a57.tar.bz2 rails-f85f5dfc8ffefff174b695c6363211d342f77a57.zip |
removes unused Class#descedents
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/extending.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index 5a375f39ad..76ed8801f9 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -1,40 +1,6 @@ require 'active_support/core_ext/class/removal' require 'active_support/core_ext/object/blank' -class Class - # Rubinius - if defined?(Class.__subclasses__) - def descendents - subclasses = [] - __subclasses__.each {|k| subclasses << k; subclasses.concat k.descendents } - subclasses - end - else - # MRI - begin - ObjectSpace.each_object(Class.new) {} - - def descendents - subclasses = [] - ObjectSpace.each_object(class << self; self; end) do |k| - subclasses << k unless k == self - end - subclasses - end - # JRuby - rescue StandardError - def descendents - subclasses = [] - ObjectSpace.each_object(Class) do |k| - subclasses << k if k < self - end - subclasses.uniq! - subclasses - end - end - end -end - class Object def extended_by #:nodoc: ancestors = class << self; ancestors end |