From: Michael Keller Date: 2006-05-31T00:52:49+09:00 Subject: optparse "invalid option" problem Hi, 'optparse' seems to continue parsing even after the first invalid argument. example.rb: require 'optparse' ARGV.options do |opts| opts.separator "Required:" opts.on("-f", "--ffmpeg PATH", String, "ffmpeg's path") { |val| ffmpeg = val } end leftOver = ARGV.parse! p leftOver > example.rb -f ./ffmpeg Tool/to/call/from/example.rb works as expected (leftOver contains "Tool/to/call/from/example.rb"), but > example.rb -f ./ffmpeg Tool/to/call/from/example.rb --toolsOption value raises "invalid option: --toolsOption" instead of pushing "Tool/to/call/from/example.rb", "--toolsOption" and "value" into leftOver Is there a way to tell optparse that everything after the first unknown argument is ignored and pushed into the resulting array? Thanks! Michael