aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-08-28 17:17:58 +0200
committerXavier Noria <fxn@hashref.com>2012-08-28 17:19:39 +0200
commitdb8ff15a497191a952e47ed8ba761f6c2cf4a1f3 (patch)
tree61721f58879b66f1c260bc75cf711a651eb840c6 /activesupport/lib
parent265c8b771de5d62e30ca138ba363f672b0d6f9a1 (diff)
downloadrails-db8ff15a497191a952e47ed8ba761f6c2cf4a1f3.tar.gz
rails-db8ff15a497191a952e47ed8ba761f6c2cf4a1f3.tar.bz2
rails-db8ff15a497191a952e47ed8ba761f6c2cf4a1f3.zip
fixes a bug in dependencies.rb
loaded stores file names without the .rb extension, but search_for_file returns file names with the extension. The solution is hackish, but this file needs a revamp.
Diffstat (limited to 'activesupport/lib')
-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 d78af2faa5..26545d8553 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -479,7 +479,7 @@ module ActiveSupport #:nodoc:
file_path = search_for_file(path_suffix)
- if file_path && ! loaded.include?(File.expand_path(file_path)) # We found a matching file to load
+ if file_path && ! loaded.include?(File.expand_path(file_path).sub(/\.rb\z/, '')) # We found a matching file to load
require_or_load file_path
raise LoadError, "Expected #{file_path} to define #{qualified_name}" unless from_mod.const_defined?(const_name, false)
return from_mod.const_get(const_name)