Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Revert "If a file is in the load path, require it without its full pa…

…th (in more places)"

Caused failures in ActionMailer test suite.

This reverts commit 991cd59.
  • Loading branch information...
commit 462666b73717333d460684339c6f6ce07475f713 1 parent cff7f53
@josevalim josevalim authored
Showing with 2 additions and 7 deletions.
  1. +2 −7 activesupport/lib/active_support/dependencies.rb
9 activesupport/lib/active_support/dependencies.rb
@@ -388,13 +388,8 @@ def loadable_constants_for_path(path, bases = autoload_paths)
# 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)

0 comments on commit 462666b

Please sign in to comment.
Something went wrong with that request. Please try again.