From: Austin Ziegler Date: 2004-12-23T01:02:32+09:00 Subject: Re: ruby-dev summary 25045-25260 On Thu, 23 Dec 2004 00:56:12 +0900, Minero Aoki wrote: >>> [ruby-dev:25048] about optparse specification >>> Minero Aoki claimed that optparse should not handle -L when >>> --line is given. It appears that anyone is not interested in >>> this issue, since there is no reply so far. >> Can you explain this a bit? If I do this: [...] > I said latter. From ruby-dev:25048: > > ~ % cat t > require 'optparse' > parser = OptionParser.new > parser.on('--line') { > puts 'opt=--line' > } > parser.parse! > > ~ % ruby t -l > opt=--line > ~ % ruby t --l > opt=--line > ~ % ruby t -L > opt=--line > ~ % ruby t --L > opt=--line > > But, thanks for nobu, it seems that optparse.rb was modified after > [ruby-dev:25048] was posted. We get following result now: Excellent! If one wants something similar to this, couldn't one do: require 'optparse' parser = Option.parser.new parser.on('--l[ine]') { puts 'opt=--l[ine]' } parser.parse! ? Thanks muchly, -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca