{"record":{"id":"5255b5f53cc798fd","repo":"ruby/rubygems","slug":"invalid-argument-value","errorCode":null,"errorMessage":"invalid argument: #{value}","messagePattern":"invalid argument: #(.+?)","errorType":"validation","errorClass":"Gem::OptionParser::InvalidArgument","httpStatus":null,"severity":"error","filePath":"lib/rubygems/local_remote_options.rb","lineNumber":24,"sourceCode":"# See LICENSE.txt for permissions.\n#++\n\nrequire_relative \"vendor/uri/lib/uri\"\nrequire_relative \"../rubygems\"\n\n##\n# Mixin methods for local and remote Gem::Command options.\n\nmodule Gem::LocalRemoteOptions\n  ##\n  # Allows Gem::OptionParser to handle HTTP URIs.\n\n  def accept_uri_http\n    Gem::OptionParser.accept Gem::URI::HTTP do |value|\n      begin\n        uri = Gem::URI.parse value\n      rescue Gem::URI::InvalidURIError\n        raise Gem::OptionParser::InvalidArgument, value\n      end\n\n      valid_uri_schemes = [\"http\", \"https\", \"file\", \"s3\"]\n      unless valid_uri_schemes.include?(uri.scheme)\n        msg = \"Invalid uri scheme for #{value}\\nPreface URLs with one of #{valid_uri_schemes.map {|s| \"#{s}://\" }}\"\n        raise ArgumentError, msg\n      end\n\n      value\n    end\n  end\n\n  ##\n  # Add local/remote options to the command line parser.\n\n  def add_local_remote_options\n    add_option(:\"Local/Remote\", \"-l\", \"--local\",\n               \"Restrict operations to the LOCAL domain\") do |_value, options|","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/local_remote_options.rb#L6-L42","documentation":"Error \"invalid argument: #{value}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/local_remote_options.rb:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the option value you passed; it must match the expected format (see `gem help <command>`)"],"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"}