jruby/json/common.rb
# 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.
Return the constant located at _path_.
Return the constant located at _path_ .
def deep_const_get(path) 
      path = path.to_s
      path.split(/::/).inject(Object) do |p, c|
        case
        when c.empty?             then p
        when p.const_defined?(c)  then p.const_get(c)
        else                      raise ArgumentError, "can't find const #{path}"
        end
      end
    end
def deep_const_get ( path ) path = path . to_s path . split ( / :: / ) . inject ( Object ) do | p , c | case when c . empty? then p when p . const_defined? ( c ) then p . const_get ( c ) else raise ArgumentError , "can't find const #{path}" end end end
Return the constant located at _path_.
Return the constant located at _path_ .
# :nodoc:
path
<not_specific>