diff options
-rw-r--r-- | activesupport/CHANGELOG | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index cc20c84a15..58727c3533 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *1.2.3* (November 7th, 2005) +* Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths. [Nicholas Seckar] + * Define kernel.rb methods in "class Object" instead of "module Kernel" to work around a Windows peculiarity [Sam Stephenson] * Fix broken tests caused by incomplete loading of active support. [Nicholas Seckar] 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 |