Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Narrow dependencies

  • Loading branch information...
commit f3f5f40e446b75ab5080b11263e9875fddc756b0 1 parent cf95f75
@jeremy jeremy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/dependencies.rb
View
2  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.
Something went wrong with that request. Please try again.