{"record":{"id":"68e0e8d5f9a276f9","repo":"ruby/rubygems","slug":"too-many-gem-names-args-join-please-sp","errorCode":null,"errorMessage":"Too many gem names (#{args.join(\", \")}); please specify only one","messagePattern":"Too many gem names \\(#(.+?)\\); please specify only one","errorType":"exception","errorClass":"Gem::CommandLineError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/command.rb","lineNumber":228,"sourceCode":"    else\n      [name]\n    end\n  end\n\n  ##\n  # Get a single gem name from the command line.  Fail if there is no gem name\n  # or if there is more than one gem name given.\n\n  def get_one_gem_name\n    args = options[:args]\n\n    if args.nil? || args.empty?\n      raise Gem::CommandLineError,\n            \"Please specify a gem name on the command line (e.g. gem build GEMNAME)\"\n    end\n\n    if args.size > 1\n      raise Gem::CommandLineError,\n            \"Too many gem names (#{args.join(\", \")}); please specify only one\"\n    end\n\n    args.first\n  end\n\n  ##\n  # Get a single optional argument from the command line.  If more than one\n  # argument is given, return only the first. Return nil if none are given.\n\n  def get_one_optional_argument\n    args = options[:args] || []\n    args.first\n  end\n\n  ##\n  # Override to provide details of the arguments a command takes.  It should\n  # return a left-justified string, one argument per line.","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/command.rb#L210-L246","documentation":"Error \"Too many gem names (#{args.join(\", \")}); please specify only one\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/command.rb:228 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"}