From 462666b73717333d460684339c6f6ce07475f713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 4 Aug 2010 14:17:00 -0300 Subject: 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. --- activesupport/lib/active_support/dependencies.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'activesupport/lib') 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) -- cgit v1.2.3