# File lib/active_support/json/backends/okjson.rb, line 387
    def nibble(c)
      case true
      when ?0 <= c && c <= ?9 then c.ord - ?0.ord
      when ?a <= c && c <= ?z then c.ord - ?a.ord + 10
      when ?A <= c && c <= ?Z then c.ord - ?A.ord + 10
      else
        raise Error, "invalid hex code #{c}"
      end
    end