diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-30 09:08:21 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-30 09:08:30 -0800 |
commit | 45dad592e47944704ab6951351b2fa29d4a2385f (patch) | |
tree | 0e62551efd57256530db817dc812abf60ed93994 /activesupport/lib | |
parent | 4da879079e103346525523d5e687dfabb1120a77 (diff) | |
download | rails-45dad592e47944704ab6951351b2fa29d4a2385f.tar.gz rails-45dad592e47944704ab6951351b2fa29d4a2385f.tar.bz2 rails-45dad592e47944704ab6951351b2fa29d4a2385f.zip |
avoid hundreds of thousands of calls to (Symbol|String)#to_s
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 1372e71a61..cdd2664418 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -95,7 +95,7 @@ module ActiveSupport #:nodoc: next unless mod.is_a?(Module) # Get a list of the constants that were added - new_constants = mod.local_constant_names - original_constants + new_constants = mod.local_constants - original_constants # self[namespace] returns an Array of the constants that are being evaluated # for that namespace. For instance, if parent.rb requires child.rb, the first @@ -123,7 +123,7 @@ module ActiveSupport #:nodoc: namespaces.map do |namespace| module_name = Dependencies.to_constant_name(namespace) original_constants = Dependencies.qualified_const_defined?(module_name) ? - Inflector.constantize(module_name).local_constant_names : [] + Inflector.constantize(module_name).local_constants : [] watching << module_name self[module_name] << original_constants |