diff options
author | José Valim <jose.valim@gmail.com> | 2010-08-04 14:17:00 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-04 14:17:46 -0300 |
commit | 462666b73717333d460684339c6f6ce07475f713 (patch) | |
tree | 1689f3e5407c077f7f88ba1b3a720044a725ab4f /activesupport/lib | |
parent | cff7f53fbcce14f190cc2d993467ba77fe8fa03d (diff) | |
download | rails-462666b73717333d460684339c6f6ce07475f713.tar.gz rails-462666b73717333d460684339c6f6ce07475f713.tar.bz2 rails-462666b73717333d460684339c6f6ce07475f713.zip |
Revert "If a file is in the load path, require it without its full path (in more places)"
Caused failures in ActionMailer test suite.
This reverts commit 991cd59a225b90ab1ba31867810b8fc0942713eb.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 198c124292..1b93eac7ee 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -388,13 +388,8 @@ module ActiveSupport #:nodoc: end # Search for a file in autoload_paths matching the provided suffix. - def search_for_file(file) - path_suffix = file.sub(/(\.rb)?$/, ".rb") - - $:.each do |root| - path = File.join(root, path_suffix) - return file if File.file?(path) - end + def search_for_file(path_suffix) + path_suffix = path_suffix.sub(/(\.rb)?$/, ".rb") autoload_paths.each do |root| path = File.join(root, path_suffix) |