Red Hat Bugzilla – Bug 1307082
optparse: invalid processing of short -l option
Last modified: 2016-02-12 13:18:46 EST
Created attachment 1123572 [details]
Invalid option matching
Description of problem:
Whenever I define and use the option '-l' with 'optparse', '-d' matches the same option as '-l'
Version-Release number of selected component (if applicable):
Steps to reproduce:
1.$ ruby test.rb -l /tmp
2.$ ruby test.rb -d /tmp/2
3. Should be like this:
$ ruby test.rb -x /tmp
test.rb:10:in `<main>': invalid option: -x (OptionParser::InvalidOption)
-d matches the same option as -l, but should not
Should match only specified short value (-l)
Test script is attached
Thank you for your report. Nevertheless:
1) I think this is spec and I explained my reasoning in the upstream ticket.
2) This is really upstream issue and I don't think it makes sense to let Fedora diverge from upstream. So if that is 'fixed' upstream, it will get into Fedora as soon as official release gets published. Please continue the discussion in upstream ticket if you wish.
Of course feel free to re-open this ticket if you disagree.