{"record":{"id":"d0322584e6788c0e","repo":"ruby/rubygems","slug":"full-name-in-gem-is-corrupt","errorCode":null,"errorMessage":"#{full_name} in #{@gem} is corrupt","messagePattern":"#(.+?) in #(.+?) is corrupt","errorType":"exception","errorClass":"Gem::Package::FormatError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/package/old.rb","lineNumber":79,"sourceCode":"\n      # install_location expects an already-resolved destination dir\n      destination_dir = File.realpath(destination_dir)\n\n      header.each do |entry|\n        full_name = entry[\"path\"]\n\n        destination = install_location full_name, destination_dir\n\n        file_data = String.new\n\n        read_until_dashes io do |line|\n          file_data << line\n        end\n\n        file_data = file_data.strip.unpack1(\"m\")\n        file_data = Zlib::Inflate.inflate file_data\n\n        raise Gem::Package::FormatError, \"#{full_name} in #{@gem} is corrupt\" if\n          file_data.length != entry[\"size\"].to_i\n\n        FileUtils.mkdir_p File.dirname(destination), mode: dir_mode && 0o755\n\n        verify_extraction_dir File.dirname(destination), destination_dir\n\n        FileUtils.rm_rf destination\n\n        File.open destination, \"wb\", file_mode(entry[\"mode\"]) do |out|\n          out.write file_data\n        end\n\n        verbose destination\n      end\n    end\n  rescue Zlib::DataError\n    raise Gem::Exception, errstr\n  end","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/package/old.rb#L61-L97","documentation":"Error \"#{full_name} in #{@gem} is corrupt\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/package/old.rb:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-download the gem; the named entry is corrupt","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"}