aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-12-31 23:53:05 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-12-31 23:53:05 +0000
commitcbe0c3c54f342ec74ced50f272be3f8d6ff7a2dd (patch)
treee8967a570f2061c772a9bb5b40afe5fe6fdee9c8 /activesupport/lib/active_support
parent7ed793076907cbb89b028a24cf01f18f9be7869d (diff)
downloadrails-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/lib/active_support')
-rw-r--r--activesupport/lib/active_support/dependencies.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 98f74453f0..f141cddc4a 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -278,7 +278,8 @@ module Dependencies #:nodoc:
# Determine if the given constant has been automatically loaded.
def autoloaded?(desc)
- return false if desc.is_a?(Module) && desc.name.empty? # Empty name => anonymous module.
+ # No name => anonymous module.
+ return false if desc.is_a?(Module) && desc.name.blank?
name = to_constant_name desc
return false unless qualified_const_defined? name
return autoloaded_constants.include?(name)