Eric Hodel
5/26/2009 8:51:00 PM
On May 23, 2009, at 21:58, Stephan Wehner wrote:
> I don't think that '-help' should be treated the same as '-h -ex lp'
> or
> '-h --ex lp'. In particular, '-help' may be a misspelling of the
> common '--help' option. Am I doing something wrong? Is there a way to
> avoid this?
When you use - instead of -- you invoke short-option-parsing like:
$ ruby -dvrubygems -e 'raise rescue nil'
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems.rb:1106 - no
such file to load -- rubygems/defaults/operating_system
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/
config_file.rb:35 - no such file to load -- Win32API
Exception `RuntimeError' at -e:1 -
$
Which is equivalent to:
ruby -d -v -r ubygems -e 'raise rescue nil'