{"record":{"id":"b5a2207954d362ba","repo":"ruby/rubygems","slug":"str-inspect-is-not-an-octal-string","errorCode":null,"errorMessage":"#{str.inspect} is not an octal string","messagePattern":"#(.+?) is not an octal string","errorType":"exception","errorClass":"Gem::Package::TarInvalidError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/package/tar_reader.rb","lineNumber":62,"sourceCode":"  ##\n  # Close the tar file\n\n  def close\n  end\n\n  ##\n  # Iterates over files in the tarball yielding each entry\n\n  def each\n    return enum_for __method__ unless block_given?\n\n    until @io.eof? do\n      begin\n        header = Gem::Package::TarHeader.from @io\n      rescue ArgumentError => e\n        # Specialize only exceptions from Gem::Package::TarHeader.strict_oct\n        raise e unless e.message.match?(/ is not an octal string$/)\n        raise Gem::Package::TarInvalidError, e.message\n      end\n\n      return if header.empty?\n      entry = Gem::Package::TarReader::Entry.new header, @io\n      yield entry\n      entry.close\n    end\n  end\n\n  alias_method :each_entry, :each\n\n  ##\n  # NOTE: Do not call #rewind during #each\n\n  def rewind\n    if @init_pos == 0\n      @io.rewind\n    else","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/package/tar_reader.rb#L44-L80","documentation":"Error \"#{str.inspect} is not an octal string\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/package/tar_reader.rb:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The tar archive is corrupt (a numeric header field is not octal); re-download the gem","Rebuild the gem if you created it"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}