Avoid calling triggering const_missing if const_missing is private when doing constantize
This commit is contained in:
parent
98c299fba5
commit
ae8c384e2c
|
@ -109,7 +109,7 @@ module ActiveSupport
|
||||||
|
|
||||||
constant = Object
|
constant = Object
|
||||||
names.each do |name|
|
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
|
end
|
||||||
constant
|
constant
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue