aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-23 16:46:33 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-23 16:46:33 +0200
commite8987c30d0dc3ae5903a6d3a6e293641759b6fc4 (patch)
tree5830b6162bdd90980ce6f2ddf9170aec01960eb2 /activesupport/lib
parentb2f34d1e3591df0f19f01ba30160661175c9a6b6 (diff)
downloadrails-e8987c30d0dc3ae5903a6d3a6e293641759b6fc4.tar.gz
rails-e8987c30d0dc3ae5903a6d3a6e293641759b6fc4.tar.bz2
rails-e8987c30d0dc3ae5903a6d3a6e293641759b6fc4.zip
Use safe_constantize where possible.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/module/reachable.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/reachable.rb b/activesupport/lib/active_support/core_ext/module/reachable.rb
index 443d2c3d53..5d3d0e9851 100644
--- a/activesupport/lib/active_support/core_ext/module/reachable.rb
+++ b/activesupport/lib/active_support/core_ext/module/reachable.rb
@@ -3,8 +3,6 @@ require 'active_support/core_ext/string/inflections'
class Module
def reachable? #:nodoc:
- !anonymous? && name.constantize.equal?(self)
- rescue NameError
- false
+ !anonymous? && name.safe_constantize.equal?(self)
end
end