mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Narrow dependencies
This commit is contained in:
@@ -333,7 +333,7 @@ module ActiveSupport #:nodoc:
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user