Whoups, I did not know that there was a commonly agreed specification for that... I'll have a deeper look at that man page. Brian, thanks a lot! B On Thu, Jul 28, 2011 at 10:38 PM, Brian Candler <b.candler / pobox.com> wrote: > It's standard option parsing behaviour. -- indicates "end of options", > and is important if any of the subsequent parameters otherwise looks > like an option. > > require "optparse" > opts = OptionParser.new > p opts.parse(%w{hello -- world --flurble --boing}) > # => ["hello", "world", "--flurble", "--boing"] > > p opts.parse(%w{hello world --flurble --boing}) > # invalid option: flurble > > Also, quoting from the getopt(1) manpage: > > "Each parameter not starting with a `-', and not a required argument of > a previous option, is a non-option parameter. Each parameter after a > `--' parameter is always interpreted as a non-option parameter. > > -- > Posted via http://www.ruby-forum.com/. > > -- PhD Student, Computer Science Department, EPL/INGI, UCLouvain, Belgium Mail: blambeau / gmail.com Mobile: +32 477 24 58 61 Blog: http://revision-zero.org/ Code: http://github.com/blambeau/ Follow: http://twitter.com/blambeau/