https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112013-06-02T16:48:13ZRuby Issue Tracking SystemRuby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=396392013-06-02T16:48:13Zzzak (zzak _)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>nobu (Nobuyoshi Nakada)</i></li></ul> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=398452013-06-11T05:13:48Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>I like this patch, I could use this feature in RDoc's option parser which ignores arguments that were valid for previous versions.</p> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=398482013-06-11T08:20:48Zprijutme4ty (Ilya Vorontsov)prijutme4ty@gmail.com
<ul></ul><p>Can anyone please take a look at a bug <a href="http://bugs.ruby-lang.org/issues/7537#change-37695" class="external">http://bugs.ruby-lang.org/issues/7537#change-37695</a> considering command-line arguments containing negative numbers (which're erroneously treated ass options) and my patch for it.<br>
I'm afraid that keeping unknown options will silently treat negative numbers (not an exception is raised) and possibly lose their ordering. So please before accepting unknown options patch, decide which behavior for such a case is right and make a specification about negative numbers in command line(as an example, they may became non-options and in such a case this proposal will work differently).<br>
In my bug report and a patch I proposed some specs for optparse behavior in this case, but they weren't yet accepted or declined.</p> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=415922013-09-04T10:31:17Zfelipec (Felipe Contreras)felipe.contreras@gmail.com
<ul></ul><p>Any update on this?</p> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=417722013-09-12T22:57:13Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>No test yet.<br>
<a href="https://github.com/nobu/ruby/tree/optparse-keep_unknown" class="external">https://github.com/nobu/ruby/tree/optparse-keep_unknown</a></p> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=922472021-05-27T22:07:57Zfelipec (Felipe Contreras)felipe.contreras@gmail.com
<ul><li><strong>File</strong> <i>0001-optparse-add-keep_unknown-option.patch</i> added</li><li><strong>File</strong> <i>0002-optparse-move-dash-dash-handling-to-a-case.patch</i> added</li><li><strong>File</strong> <i>0003-optparse-properly-keep-dash-dash.patch</i> added</li></ul><p>Nobody had requested any tests. It would have been much easier if 7 years ago you had written the two lines of code required to test this.</p>
<p>Anyway, I've rebased my changes on top of the latest master, and added some tests.</p> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=922502021-05-28T01:16:03Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>File</strong> deleted (<del><i>delete.patch</i></del>)</li></ul> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=1026082023-04-02T06:51:40Zfelipec (Felipe Contreras)felipe.contreras@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/9438">0001-Add-keep_unknown-option.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/9438/0001-Add-keep_unknown-option.patch">0001-Add-keep_unknown-option.patch</a> added</li><li><strong>File</strong> <a href="/attachments/9439">0002-Move-dash-dash-handling-to-a-case.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/9439/0002-Move-dash-dash-handling-to-a-case.patch">0002-Move-dash-dash-handling-to-a-case.patch</a> added</li><li><strong>File</strong> <a href="/attachments/9440">0003-Properly-keep-dash-dash.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/9440/0003-Properly-keep-dash-dash.patch">0003-Properly-keep-dash-dash.patch</a> added</li><li><strong>Subject</strong> changed from <i>PATCH: optparse: add keep_unknown option</i> to <i>PATCH: optparse: add `keep_unknown` option</i></li></ul><p>Updated on top of master yet again.</p> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=1026092023-04-02T06:51:56Zfelipec (Felipe Contreras)felipe.contreras@gmail.com
<ul><li><strong>File</strong> deleted (<del><i>0001-optparse-add-keep_unknown-option.patch</i></del>)</li></ul> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=1026102023-04-02T06:51:59Zfelipec (Felipe Contreras)felipe.contreras@gmail.com
<ul><li><strong>File</strong> deleted (<del><i>0002-optparse-move-dash-dash-handling-to-a-case.patch</i></del>)</li></ul> Ruby master - Feature #8460: PATCH: optparse: add `keep_unknown` optionhttps://redmine.ruby-lang.org/issues/8460?journal_id=1026112023-04-02T06:52:02Zfelipec (Felipe Contreras)felipe.contreras@gmail.com
<ul><li><strong>File</strong> deleted (<del><i>0003-optparse-properly-keep-dash-dash.patch</i></del>)</li></ul>