diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-12-31 18:53:58 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-12-31 18:53:58 +0000 |
commit | 91b71ed30cc1c075860c1a098bab5603c3f90178 (patch) | |
tree | 9fda1b6fe4f49cb4de3e28e26c775da3fc49f99e /activesupport/lib/active_support | |
parent | 54e56ddb6050257966cadbbd5d4d0c9b10f17f8e (diff) | |
download | rails-91b71ed30cc1c075860c1a098bab5603c3f90178.tar.gz rails-91b71ed30cc1c075860c1a098bab5603c3f90178.tar.bz2 rails-91b71ed30cc1c075860c1a098bab5603c3f90178.zip |
Fix Dependencies.autoloaded? to ignore anonymous modules. Closes #6561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index aa5b8d20da..98f74453f0 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -278,6 +278,7 @@ 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. name = to_constant_name desc return false unless qualified_const_defined? name return autoloaded_constants.include?(name) |