nobu.nokada / softhome.net writes: >> 1. It seems not to allow the '-d directory' style of option values. >> This is really bad. In the unix world this is almost standard. >> Also the Posix recommandation says explicitly that both '-d directroy' >> and '-ddirectory' should be accepted. > > Well, I might misunderstand you? > > $ ruby -roptparse -e 'ARGV.options{|opt|opt.def_option("-dDIR"){|d|@dir=d};opt.parse!};p self' -- -dhere > #<Object:0x401938e4 @dir="here"> > > $ ruby -roptparse -e 'ARGV.options{|opt|opt.def_option("-dDIR"){|d|@dir=d};opt.parse!};p self' -- -d here > #<Object:0x401938e4 @dir="here"> I do see this behavior: ruby-cvs -roptparse -e 'ARGV.options{|opt|opt.on("--dir=[DIR]"){|d|@dir=d};opt.parse!};p self' -- --dir here #<Object:0x401b89fc @dir=nil> Optional arguments are not "greedy" but I would expect them to be. Still, I like optparse much better than getoptlong -- once I learned how to use it.