Skip to content

Commit

Permalink
Fix const_missing handler to ignore the trailing '.rb' on files when …
Browse files Browse the repository at this point in the history
…comparing paths.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
seckar committed Nov 10, 2005
1 parent 80b8b76 commit 41e4173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions activesupport/CHANGELOG
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def const_missing(class_id)
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
Expand Down

0 comments on commit 41e4173

Please sign in to comment.