End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::CommandManager#process_args
process_args(args, build_args=nil)
lib/rubygems/command_manager.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/command_manager.rb, line 165
def process_args(args, build_args=nil)
if args.empty?
say Gem::Command::HELP
terminate_interaction 1
end
case args.first
when "-h", "--help" then
say Gem::Command::HELP
terminate_interaction 0
when "-v", "--version" then
say Gem::VERSION
terminate_interaction 0
when /^-/ then
alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.")
terminate_interaction 1
else
cmd_name = args.shift.downcase
cmd = find_command cmd_name
cmd.deprecation_warning if cmd.deprecated?
cmd.invoke_with_build_args args, build_args
end
end
No documentation available
See also
#load_and_instantiate
#register_command
#instance
#run
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0