End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OptionParser#order
order(*argv, into: nil, &nonopt)
lib/optparse.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/optparse.rb, line 1619
def order(*argv, into: nil, &nonopt)
argv = argv[0].dup if argv.size == 1 and Array === argv[0]
order!(argv, into: into, &nonopt)
end
Parses command line arguments argv in order. When a block is given, each non-option argument is yielded. When optional into keyword argument is provided, the parsed option values are stored there via []= method (so it can be Hash, or OpenStruct, or other similar object).
Returns the rest of argv left unparsed.