diff options
author | Xavier Noria <fxn@hashref.com> | 2010-02-07 23:03:13 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-02-07 23:03:13 +0100 |
commit | afd2e19be3b74effa3fdb9c4affd48f0aaede838 (patch) | |
tree | 81d15739b66571d3ec78066a8482af3437a8d6ea /activesupport/lib/active_support/core_ext | |
parent | b235af702a086dd06fa9849ee47942e8ce82090d (diff) | |
download | rails-afd2e19be3b74effa3fdb9c4affd48f0aaede838.tar.gz rails-afd2e19be3b74effa3fdb9c4affd48f0aaede838.tar.bz2 rails-afd2e19be3b74effa3fdb9c4affd48f0aaede838.zip |
removes Module#included_in_classes, which is no longer used
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/inclusion.rb | 30 |
2 files changed, 0 insertions, 31 deletions
diff --git a/activesupport/lib/active_support/core_ext/module.rb b/activesupport/lib/active_support/core_ext/module.rb index fbe89fe07c..b9c9614ca6 100644 --- a/activesupport/lib/active_support/core_ext/module.rb +++ b/activesupport/lib/active_support/core_ext/module.rb @@ -1,7 +1,6 @@ require 'active_support/core_ext/module/aliasing' require 'active_support/core_ext/module/introspection' -require 'active_support/core_ext/module/inclusion' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/module/attr_internal' require 'active_support/core_ext/module/attr_accessor_with_default' diff --git a/activesupport/lib/active_support/core_ext/module/inclusion.rb b/activesupport/lib/active_support/core_ext/module/inclusion.rb deleted file mode 100644 index 4f23841645..0000000000 --- a/activesupport/lib/active_support/core_ext/module/inclusion.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Module - # Returns the classes in the current ObjectSpace where this module has been - # mixed in according to Module#included_modules. - # - # module M - # end - # - # module N - # include M - # end - # - # class C - # include M - # end - # - # class D < C - # end - # - # p M.included_in_classes # => [C, D] - # - def included_in_classes - classes = [] - ObjectSpace.each_object(Class) { |k| classes << k if k.included_modules.include?(self) } - - classes.reverse.inject([]) do |unique_classes, klass| - unique_classes << klass unless unique_classes.collect { |k| k.to_s }.include?(klass.to_s) - unique_classes - end - end -end
\ No newline at end of file |