Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OptionParser#order!
order!(argv = default_argv, into: nil, &nonopt)
lib/optparse.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/optparse.rb, line 1628
def order!(argv = default_argv, into: nil, &nonopt)
setter = ->(name, val) {into[name.to_sym] = val} if into
parse_in_order(argv, setter, &nonopt)
end
Same as order, but removes switches destructively. Non-option arguments remain in argv.