End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Command#add_extra_args
add_extra_args(args)
lib/rubygems/command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/command.rb, line 451
def add_extra_args(args)
result = []
s_extra = Gem::Command.specific_extra_args(@command)
extra = Gem::Command.extra_args + s_extra
until extra.empty? do
ex = []
ex << extra.shift
ex << extra.shift if extra.first.to_s =~ /^[^-]/ # rubocop:disable Performance/StartWith
result << ex if handles?(ex)
end
result.flatten!
result.concat(args)
result
end
Adds extra args from ~/.gemrc
See also
.specific_extra_args_hash
#add_option
.specific_extra_args
#add_parser_run_info
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0