avoid hundreds of thousands of calls to (Symbol|String)#to_s
This commit is contained in:
parent
4da879079e
commit
45dad592e4
@ -95,7 +95,7 @@ def new_constants
|
||||
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 @@ def watch_namespaces(namespaces)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user