aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/class/removal.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2009-12-17 11:24:02 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2009-12-17 11:24:02 +1100
commit186cd7bc530f705b889c27f3680ab48c7c10a6f3 (patch)
tree76955e442615d77ee05ef2a8260c5373e1cac680 /activesupport/lib/active_support/core_ext/class/removal.rb
parent5f2395041d1578433fa825ed5c6f26a201f2203d (diff)
parentb9d4ceb43c9497fb1c47d8b1e1e6a24a9e157384 (diff)
downloadrails-186cd7bc530f705b889c27f3680ab48c7c10a6f3.tar.gz
rails-186cd7bc530f705b889c27f3680ab48c7c10a6f3.tar.bz2
rails-186cd7bc530f705b889c27f3680ab48c7c10a6f3.zip
Merge branch 'rails'
Conflicts: actionmailer/lib/action_mailer.rb actionmailer/lib/action_mailer/delivery_method/smtp.rb
Diffstat (limited to 'activesupport/lib/active_support/core_ext/class/removal.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/class/removal.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb
index 2dea3c24d5..652be4ed78 100644
--- a/activesupport/lib/active_support/core_ext/class/removal.rb
+++ b/activesupport/lib/active_support/core_ext/class/removal.rb
@@ -2,7 +2,11 @@ require 'active_support/core_ext/object/extending'
require 'active_support/core_ext/module/introspection'
class Class #:nodoc:
-
+
+ def reachable?
+ eval("defined?(::#{self}) && ::#{self}.equal?(self)")
+ end
+
# Unassociates the class with its subclasses and removes the subclasses
# themselves.
#