lib/active_support/dependencies.rb in activesupport-1.4.2 vs lib/active_support/dependencies.rb in activesupport-1.4.3
- old
+ new
@@ -316,17 +316,17 @@
# Build the watch frames. Each frame is a tuple of
# [module_name_as_string, constants_defined_elsewhere]
watch_frames = descs.collect do |desc|
if desc.is_a? Module
mod_name = desc.name
- initial_constants = desc.constants
+ initial_constants = desc.local_constants
elsif desc.is_a?(String) || desc.is_a?(Symbol)
mod_name = desc.to_s
# Handle the case where the module has yet to be defined.
initial_constants = if qualified_const_defined?(mod_name)
- mod_name.constantize.constants
+ mod_name.constantize.local_constants
else
[]
end
else
raise Argument, "#{desc.inspect} does not describe a module!"
@@ -347,10 +347,10 @@
# Module still doesn't exist? Treat it as if it has no constants.
next [] unless qualified_const_defined?(mod_name)
mod = mod_name.constantize
next [] unless mod.is_a? Module
- new_constants = mod.constants - prior_constants
+ new_constants = mod.local_constants - prior_constants
# Make sure no other frames takes credit for these constants.
constant_watch_stack.each do |frame_name, constants|
constants.concat new_constants if frame_name == mod_name
end