diff options
author | José Valim <jose.valim@gmail.com> | 2010-06-19 17:16:11 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-19 17:16:11 +0200 |
commit | d430db9fd407fd6aee25ca13538d8988dc7ee297 (patch) | |
tree | 3ee11ca65b495d3c427e40b9a41d532689979727 /activesupport/lib | |
parent | 033e0a041f10ef4d4aa8ebb576560df20b971026 (diff) | |
download | rails-d430db9fd407fd6aee25ca13538d8988dc7ee297.tar.gz rails-d430db9fd407fd6aee25ca13538d8988dc7ee297.tar.bz2 rails-d430db9fd407fd6aee25ca13538d8988dc7ee297.zip |
Remove descendants warning while executing tests.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/descendants_tracker.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/descendants_tracker.rb b/activesupport/lib/active_support/descendants_tracker.rb index a9379bf95b..a587d7770c 100644 --- a/activesupport/lib/active_support/descendants_tracker.rb +++ b/activesupport/lib/active_support/descendants_tracker.rb @@ -4,9 +4,12 @@ module ActiveSupport # This module provides an internal implementation to track descendants # which is faster than iterating through ObjectSpace. module DescendantsTracker - mattr_accessor :descendants @@descendants = Hash.new { |h, k| h[k] = [] } + def self.descendants + @@descendants + end + def self.clear @@descendants.each do |klass, descendants| if ActiveSupport::Dependencies.autoloaded?(klass) |