End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OptionParser::Switch::RequiredArgument#parse
parse(arg, argv)
lib/optparse.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/optparse.rb, line 706
def parse(arg, argv)
unless arg
raise MissingArgument if argv.empty?
arg = argv.shift
end
conv_arg(*parse_arg(arg, &method(:raise)))
end
Raises an exception if argument is not present.