aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2005-11-10 20:32:13 +0000
committerNicholas Seckar <nseckar@gmail.com>2005-11-10 20:32:13 +0000
commit41e4173fd6ce8d6302e096e46976bfb79fb8aeb5 (patch)
tree967db115968543539fd8c04123e95b74a26698c2 /activesupport/lib/active_support/dependencies.rb
parent80b8b76091f680e4a4714ef8ec8458745a6f9388 (diff)
downloadrails-41e4173fd6ce8d6302e096e46976bfb79fb8aeb5.tar.gz
rails-41e4173fd6ce8d6302e096e46976bfb79fb8aeb5.tar.bz2
rails-41e4173fd6ce8d6302e096e46976bfb79fb8aeb5.zip
Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 26466097e8..9681af6dff 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -196,7 +196,7 @@ class Module #:nodoc:
return Object.const_get(class_id)
rescue MissingSourceFile => e
# Convert the exception to a NameError only if the file we are looking for is the missing one.
- raise unless e.path == "#{file_name}.rb"
+ raise unless e.is_missing? file_name
raise NameError.new("uninitialized constant #{class_id}").copy_blame!(e)
end
end