aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-03-26 19:08:40 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-03-26 19:08:40 -0700
commitf3f5f40e446b75ab5080b11263e9875fddc756b0 (patch)
tree3309da7da3487e7111c077e62988dd084a4390cd /activesupport/lib/active_support/dependencies.rb
parentcf95f75695e22e9897804a6fb7f4d8d13a247b61 (diff)
downloadrails-f3f5f40e446b75ab5080b11263e9875fddc756b0.tar.gz
rails-f3f5f40e446b75ab5080b11263e9875fddc756b0.tar.bz2
rails-f3f5f40e446b75ab5080b11263e9875fddc756b0.zip
Narrow dependencies
Diffstat (limited to 'activesupport/lib/active_support/dependencies.rb')
-rw-r--r--activesupport/lib/active_support/dependencies.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 467205addf..61823fdeb2 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -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