diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/dependencies.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/dependencies.rb index c47faad38d..4f4dfa4a71 100644 --- a/activesupport/lib/dependencies.rb +++ b/activesupport/lib/dependencies.rb @@ -29,6 +29,12 @@ module Dependencies self.loaded = [ ] end + def reload + old_loaded = loaded.dup + clear + old_loaded.each { |file_name| depend_on(file_name, true) } + end + private def require_or_load(file_name) mechanism == :load ? silence_warnings { load("#{file_name}.rb") } : require(file_name) |