Hi,

At Wed, 31 May 2006 01:03:56 +0900,
Anton 'tony' Bangratz wrote in [ruby-talk:195197]:
> >> 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

optparse has two modes, permutation and in-order.  It is
permutation mode by default, and in-order mode if the
environment variable POSIXLY_CORRECT is set.


> > Is there a way to tell optparse that everything after the first unknown
> > argument is ignored and pushed into the resulting array?

ARGV.order!

-- 
Nobu Nakada