From 41e4173fd6ce8d6302e096e46976bfb79fb8aeb5 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Thu, 10 Nov 2005 20:32:13 +0000 Subject: 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 --- activesupport/lib/active_support/dependencies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3