diff options
author | Carl Lerche <carllerche@mac.com> | 2010-02-18 16:29:32 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-02-18 16:29:32 -0800 |
commit | ae8c384e2c07da4870dd3919321a6d49aeff3588 (patch) | |
tree | 80c42d3bff756773fea781736707b70f5b1f75ad /activesupport | |
parent | 98c299fba5bdaf3f1c156c2e16a5a95a5d9cf251 (diff) | |
download | rails-ae8c384e2c07da4870dd3919321a6d49aeff3588.tar.gz rails-ae8c384e2c07da4870dd3919321a6d49aeff3588.tar.bz2 rails-ae8c384e2c07da4870dd3919321a6d49aeff3588.zip |
Avoid calling triggering const_missing if const_missing is private when doing constantize
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 41277893e3..c7df62e915 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -109,7 +109,7 @@ module ActiveSupport constant = Object names.each do |name| - constant = constant.const_get(name, false) || constant.const_missing(name) + constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name) end constant end |