Issue #8460 has been updated by drbrain (Eric Hodel).


I like this patch, I could use this feature in RDoc's option parser which ignores arguments that were valid for previous versions.
----------------------------------------
Feature #8460: PATCH: optparse: add keep_unknown option
https://bugs.ruby-lang.org/issues/8460#change-39845

Author: felipec (Felipe Contreras)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: lib
Target version: 


Currently people have to do very convoluted tricks, essentially making
it impossible for optparse to keep unknown options.

The safest and cleanest way is to do it in the code itself.

[1] http://www.ruby-forum.com/topic/88081
[2] http://stackoverflow.com/questions/3642331/can-optparse-skip-unknown-options-to-be-processed-later-in-a-ruby-program


-- 
http://bugs.ruby-lang.org/