         throw new JsonPointerError("Invalid JSON fragment pointer: #{str}")
 
   ###
-  # Converts an array of path segments into a json path.
-  # This method is the reverse of `.parse`.
+  # Converts an array of path segments into a json pointer.
+  # This method is the reverse of `.parsePointer`.
   #
   # @param {string[]} segments
   # @returns {string}

        return false

  ###
  # Parses a json-pointer, as desribed by RFC901, into an array of path segments.
  #
  # @throws {JsonPointerError} for invalid json-pointers.
  #

  @compile: (segments) ->
    segments.map((segment) -> '/' + JsonPointer.escape(segment)).join('')

  ###
  # Converts an array of path segments into a json pointer.
  # This method is the reverse of `.parsePointer`.
  #
  # @param {string[]} segments
  # @returns {string}
  ###
  @compilePointer: (segments) ->
    segments.map((segment) -> '/' + JsonPointer.escape(segment)).join('')

  ###
  # Converts an array of path segments into a json fragment pointer.
  # This method is the reverse of `.parseFragment`.
  #
  # @param {string[]} segments
  # @returns {string}
  ###
  @compileFragment: (segments) ->
    '#' + segments.map((segment) -> '/' + JsonPointer.escapeFragment(segment)).join('')

