From: Jos Backus Date: 2005-03-16T05:46:04+09:00 Subject: Re: OptionParser question On Tue, Mar 15, 2005 at 11:02:21PM +0900, Jonathan Paisley wrote: > opt.parse! returns the remaining non-option arguments (which is in fact > just ARGV at this stage, with options removed), or nil upon failure. This > is propagated to the return value of ARGV.options. A common idiom seems to > be: > > ARGV.options do |opt| > ... > ... > opt.parse! > end or exit 1 > # ^^^^^^^^^ I might use this. The downside here is that one doesn't know which option failed so it's hard to give a more specific error message. Perhaps the author will address this issue in due time. Thanks! -- Jos Backus jos at catnook.com