diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-31 23:53:05 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-31 23:53:05 +0000 |
commit | cbe0c3c54f342ec74ced50f272be3f8d6ff7a2dd (patch) | |
tree | e8967a570f2061c772a9bb5b40afe5fe6fdee9c8 /activesupport/test | |
parent | 7ed793076907cbb89b028a24cf01f18f9be7869d (diff) | |
download | rails-cbe0c3c54f342ec74ced50f272be3f8d6ff7a2dd.tar.gz rails-cbe0c3c54f342ec74ced50f272be3f8d6ff7a2dd.tar.bz2 rails-cbe0c3c54f342ec74ced50f272be3f8d6ff7a2dd.zip |
Check for nil name also. Closes #6561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 95a5380dbd..c0b6d89c66 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -305,7 +305,12 @@ class DependenciesTest < Test::Unit::TestCase assert Dependencies.autoloaded?("::ModuleFolder") assert Dependencies.autoloaded?(:ModuleFolder) - assert ! Dependencies.autoloaded?(Module.new) + # Anonymous modules aren't autoloaded. + assert !Dependencies.autoloaded?(Module.new) + + nil_name = Module.new + def nil_name.name() nil end + assert !Dependencies.autoloaded?(nil_name) Object.send :remove_const, :ModuleFolder end |