aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2007-03-14 23:27:28 +0000
committerNicholas Seckar <nseckar@gmail.com>2007-03-14 23:27:28 +0000
commit4eec5f4fbb995ce665cb82367cc3965e74147b19 (patch)
treeb44ff95dc30372057dc47699423bad0c35c0a4b0 /activesupport/lib/active_support/dependencies.rb
parentbbcfb9b625c4ed471fcf7c827b700ccb025e7dd9 (diff)
downloadrails-4eec5f4fbb995ce665cb82367cc3965e74147b19.tar.gz
rails-4eec5f4fbb995ce665cb82367cc3965e74147b19.tar.bz2
rails-4eec5f4fbb995ce665cb82367cc3965e74147b19.zip
Update Dependencies to ignore constants inherited from ancestors. Closes #6951.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/dependencies.rb')
-rw-r--r--activesupport/lib/active_support/dependencies.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 4880b70804..2f6ae284bf 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -318,13 +318,13 @@ module Dependencies #:nodoc:
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
@@ -349,7 +349,7 @@ module Dependencies #:nodoc:
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|