From 26eaf073c4de8276663f927fdeeb91453e8b3956 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sun, 26 Feb 2006 17:49:09 +0000 Subject: Remove ::Controllers related cruft; fix AP tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/class/removal.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb index 628781669d..b217c1957c 100644 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ b/activesupport/lib/active_support/core_ext/class/removal.rb @@ -8,17 +8,17 @@ class Class #:nodoc: end def remove_class(*klasses) - klasses.each do |klass| + klasses.flatten.each do |klass| # Skip this class if there is nothing bound to this name next unless defined?(klass.name) - + basename = klass.to_s.split("::").last parent = klass.parent - + # Skip this class if it does not match the current one bound to this name next unless parent.const_defined?(basename) && klass = parent.const_get(basename) - + parent.send :remove_const, basename unless parent == klass end end -end \ No newline at end of file +end -- cgit v1.2.3