lib/active_support/dependencies.rb in activesupport-2.0.2 vs lib/active_support/dependencies.rb in activesupport-2.0.4

- old
+ new

@@ -284,11 +284,11 @@ return autoloaded_constants.include?(name) end # Will the provided constant descriptor be unloaded? def will_unload?(const_desc) - autoloaded?(desc) || + autoloaded?(const_desc) || explicitly_unloadable_constants.include?(to_constant_name(const_desc)) end # Mark the provided constant name for unloading. This constant will be # unloaded on each request, not just the next one. @@ -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.local_constants + initial_constants = desc.local_constant_names 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.local_constants + mod_name.constantize.local_constant_names 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.local_constants - prior_constants + new_constants = mod.local_constant_names - 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