Permalink
Browse files

removes unused Class#descedents

  • Loading branch information...
1 parent 245bfaf commit f85f5dfc8ffefff174b695c6363211d342f77a57 @fxn fxn committed Jan 26, 2010
Showing with 0 additions and 34 deletions.
  1. +0 −34 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

0 comments on commit f85f5df

Please sign in to comment.