Permalink
Browse files

Narrow dependencies

  • Loading branch information...
1 parent cf95f75 commit f3f5f40e446b75ab5080b11263e9875fddc756b0 @jeremy jeremy committed Mar 27, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/dependencies.rb
@@ -333,7 +333,7 @@ def loadable_constants_for_path(path, bases = load_paths)
# Search for a file in load_paths matching the provided suffix.
def search_for_file(path_suffix)
- path_suffix = path_suffix + '.rb' unless path_suffix.ends_with? '.rb'
+ path_suffix = "#{path_suffix}.rb" unless path_suffix =~ /\.rb\Z/
load_paths.each do |root|
path = File.join(root, path_suffix)
return path if File.file? path

0 comments on commit f3f5f40

Please sign in to comment.