aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-08-04 14:17:00 -0300
committerJosé Valim <jose.valim@gmail.com>2010-08-04 14:17:46 -0300
commit462666b73717333d460684339c6f6ce07475f713 (patch)
tree1689f3e5407c077f7f88ba1b3a720044a725ab4f /activesupport/lib/active_support/dependencies.rb
parentcff7f53fbcce14f190cc2d993467ba77fe8fa03d (diff)
downloadrails-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/active_support/dependencies.rb')
-rw-r--r--activesupport/lib/active_support/dependencies.rb9
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)