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::NoArgument#parse
parse(arg, argv) { |NeedlessArgument, arg| ... }
lib/optparse.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/optparse.rb, line 685
def parse(arg, argv)
yield(NeedlessArgument, arg) if arg
conv_arg(arg)
end
Raises an exception if any arguments given.