def deep_const_get(path) # :nodoc:
      path.to_s.split(/::/).inject(Object) do |p, c|
        case
        when c.empty?                     then p
        when JSON.const_defined_in?(p, c) then p.const_get(c)
        else
          begin
            p.const_missing(c)
          rescue NameError => e
            raise ArgumentError, "can't get const #{path}: #{e}"
          end
        end
      end
    end
Return the constant located at _path_. The format of _path_ has to be
either ::A::B::C or A::B::C. In any case, A has to be located at the top
level (absolute namespace path?). If there doesn't exist a constant at
the given path, an ArgumentError is raised.