Avoid calling triggering const_missing if const_missing is private when doing constantize

This commit is contained in:
Carl Lerche 2010-02-18 16:29:32 -08:00
parent 98c299fba5
commit ae8c384e2c
1 changed files with 1 additions and 1 deletions

View File

@ -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