End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Command#get_one_optional_argument
get_one_optional_argument
lib/rubygems/command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/command.rb, line 236
def get_one_optional_argument
args = options[:args] || []
args.first
end
Get a single optional argument from the command line. If more than one argument is given, return only the first. Return nil if none are given.
See also
#get_one_gem_name
#handle_options
#get_all_gem_names_and_versions
#handles?
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0