{"record":{"id":"4519571f36e6beb8","repo":"ruby/rubygems","slug":"e-class-e-message","errorCode":null,"errorMessage":"#{e.class}: #{e.message}","messagePattern":"#\\{e\\.class\\}: #\\{e\\.message\\}","errorType":"exception","errorClass":"MarshalError","httpStatus":null,"severity":"error","filePath":"lib/bundler.rb","lineNumber":513,"sourceCode":"      extensions = [RbConfig::CONFIG[\"EXEEXT\"]] unless extensions&.any?\n      candidates = extensions.map {|ext| \"#{path}#{ext}\" }\n\n      candidates.find {|candidate| File.file?(candidate) && File.executable?(candidate) }\n    end\n\n    def read_file(file)\n      SharedHelpers.filesystem_access(file, :read) do\n        File.open(file, \"r:UTF-8\", &:read)\n      end\n    end\n\n    def safe_load_marshal(data)\n      if Gem.respond_to?(:load_safe_marshal)\n        Gem.load_safe_marshal\n        begin\n          Gem::SafeMarshal.safe_load(data)\n        rescue Gem::SafeMarshal::Reader::Error, Gem::SafeMarshal::Visitors::ToRuby::Error => e\n          raise MarshalError, \"#{e.class}: #{e.message}\"\n        end\n      else\n        load_marshal(data, marshal_proc: SafeMarshal.proc)\n      end\n    end\n\n    def load_gemspec(file, validate = false)\n      @gemspec_cache ||= {}\n      key = File.expand_path(file)\n      @gemspec_cache[key] ||= load_gemspec_uncached(file, validate)\n      # Protect against caching side-effected gemspecs by returning a\n      # new instance each time.\n      @gemspec_cache[key]&.dup\n    end\n\n    def load_gemspec_uncached(file, validate = false)\n      path = Pathname.new(file)\n      contents = read_file(file)","sourceCodeStart":495,"sourceCodeEnd":531,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler.rb#L495-L531","documentation":"Error \"#{e.class}: #{e.message}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler.rb:513 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}