Preview Ruby 4.1 is a preview. It can change before the final release. 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-4.1.0-preview1/lib/rubygems/command_manager.rb, line 163
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 "-C" then
args.shift
start_point = args.shift
if Dir.exist?(start_point)
Dir.chdir(start_point) { invoke_command(args, build_args) }
else
alert_error clean_text("#{start_point} isn't a directory.")
terminate_interaction 1
end
when /^-/ then
alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.")
terminate_interaction 1
else
invoke_command(args, build_args)
end
end
No documentation available
See also
#load_and_instantiate
#register_command
#invoke_command
#run
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0