{"record":{"id":"2869eb8d2e7170a6","repo":"ruby/rubygems","slug":"e-message-in-path","errorCode":null,"errorMessage":"#{e.message} in #{path}","messagePattern":"#(.+?) in #(.+?)","errorType":"exception","errorClass":"Gem::Package::FormatError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/package.rb","lineNumber":354,"sourceCode":"    @contents = []\n\n    @gem.with_read_io do |io|\n      gem_tar = Gem::Package::TarReader.new io\n\n      gem_tar.each do |entry|\n        next unless entry.full_name == \"data.tar.gz\"\n\n        open_tar_gz entry do |pkg_tar|\n          pkg_tar.each do |contents_entry|\n            @contents << contents_entry.full_name\n          end\n        end\n\n        return @contents\n      end\n    end\n  rescue Zlib::GzipFile::Error, EOFError, Gem::Package::TarInvalidError => e\n    raise Gem::Package::FormatError.new e.message, @gem\n  end\n\n  ##\n  # Creates a digest of the TarEntry +entry+ from the digest algorithm set by\n  # the security policy.\n\n  def digest(entry) # :nodoc:\n    algorithms = if @checksums\n      @checksums.to_h {|algorithm, _| [algorithm, Gem::Security.create_digest(algorithm)] }\n    elsif Gem::Security::DIGEST_NAME\n      { Gem::Security::DIGEST_NAME => Gem::Security.create_digest(Gem::Security::DIGEST_NAME) }\n    end\n\n    return @digests if algorithms.nil? || algorithms.empty?\n\n    buf = String.new(capacity: 16_384, encoding: Encoding::BINARY)\n    until entry.eof?\n      entry.readpartial(16_384, buf)","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/package.rb#L336-L372","documentation":"Error \"#{e.message} in #{path}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/package.rb:354 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the underlying error reported for the given path (usually a corrupt or unreadable file inside the package)"],"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"}