diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/dependencies.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/dependencies.rb index 3ceec71873..e5e806b65a 100644 --- a/activesupport/lib/dependencies.rb +++ b/activesupport/lib/dependencies.rb @@ -35,6 +35,10 @@ module Dependencies def require_or_load(file_name) load? ? load("#{file_name}.rb") : require(file_name) end + + def remove_subclasses_for(*classes) + classes.each { |klass| klass.remove_subclasses } + end end Object.send(:define_method, :require_or_load) { |file_name| Dependencies.require_or_load(file_name) } unless Object.respond_to?(:require_or_load) |