diff options
| author | Xavier Noria <fxn@hashref.com> | 2012-08-28 17:17:58 +0200 | 
|---|---|---|
| committer | Xavier Noria <fxn@hashref.com> | 2012-08-28 17:22:56 +0200 | 
| commit | 8333b93e3109f85ff8efb0bb376ac833b1c56c21 (patch) | |
| tree | bb43d11f28fb233727fbdc3e60f1f729f64b1ed5 | |
| parent | dcb2bee35e773192f8a78065c193156b7d3da6ec (diff) | |
| download | rails-8333b93e3109f85ff8efb0bb376ac833b1c56c21.tar.gz rails-8333b93e3109f85ff8efb0bb376ac833b1c56c21.tar.bz2 rails-8333b93e3109f85ff8efb0bb376ac833b1c56c21.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.
| -rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 43dd22654a..25ca5a9a22 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -498,7 +498,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 local_const_defined?(from_mod, const_name)          return from_mod.const_get(const_name) | 
