{"record":{"id":"6c10fff240c2372c","repo":"ruby/rubygems","slug":"e-class-e-message-6c10ff","errorCode":null,"errorMessage":"#{e.class}: #{e.message}","messagePattern":"#\\{e\\.class\\}: #\\{e\\.message\\}","errorType":"exception","errorClass":"MalformattedPlugin","httpStatus":null,"severity":"error","filePath":"lib/bundler/plugin.rb","lineNumber":353,"sourceCode":"    #\n    # @raise [MalformattedPlugin] if plugins.rb raises any error\n    def register_plugin(name, spec, optional_plugin = false)\n      commands = @commands\n      sources = @sources\n      hooks = @hooks_by_event\n\n      @commands = {}\n      @sources = {}\n      @hooks_by_event = Hash.new {|h, k| h[k] = [] }\n\n      load_paths = spec.load_paths\n      Gem.add_to_load_path(*load_paths)\n      path = Pathname.new spec.full_gem_path\n\n      begin\n        load path.join(PLUGIN_FILE_NAME), true\n      rescue StandardError => e\n        raise MalformattedPlugin, \"#{e.class}: #{e.message}\"\n      end\n\n      if optional_plugin && @sources.keys.any? {|s| source_plugin(s) }\n        Bundler.rm_rf(path)\n        false\n      else\n        index.register_plugin(name, path.to_s, load_paths, @commands.keys,\n          @sources.keys, @hooks_by_event.keys)\n        true\n      end\n    ensure\n      @commands = commands\n      @sources = sources\n      @hooks_by_event = hooks\n    end\n\n    # Executes the plugins.rb file\n    #","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/plugin.rb#L335-L371","documentation":"Error \"#{e.class}: #{e.message}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/plugin.rb:353 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"}