aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-02-08 16:04:37 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-02-08 16:04:37 -0800
commit3c8e0a47f942e435208b69d90a95eb8c6cea8cf9 (patch)
treed4cbb5da120045c28b38cd2db299ac85c130c5bd /activesupport/lib
parent3c2fe5ccc5e51c0c3133f471cb3f0ee882fabf54 (diff)
parent4fa8c8b52f2ee7155b18cee2f3fc978075c68db1 (diff)
downloadrails-3c8e0a47f942e435208b69d90a95eb8c6cea8cf9.tar.gz
rails-3c8e0a47f942e435208b69d90a95eb8c6cea8cf9.tar.bz2
rails-3c8e0a47f942e435208b69d90a95eb8c6cea8cf9.zip
Merge pull request #13977 from Octember/master
Fixed an issue where reloading of removed dependencies would cause an un...
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 6be19771f5..7ea3ff7d3f 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -665,6 +665,14 @@ module ActiveSupport #:nodoc:
constants = normalized.split('::')
to_remove = constants.pop
+ # Remove the file path from the loaded list.
+ file_path = search_for_file(const.underscore)
+ if file_path
+ expanded = File.expand_path(file_path)
+ expanded.sub!(/\.rb\z/, '')
+ self.loaded.delete(expanded)
+ end
+
if constants.empty?
parent = Object
else