[ruby-core:74092] [Ruby trunk Bug#12135] OptParse rejects --longopt= with a zero-length argument.

From: tim-rubylang@...
Date: 2016-03-02 10:57:42 UTC
List: ruby-core #74092
Issue #12135 has been reported by Tim Baverstock.

----------------------------------------
Bug #12135: OptParse rejects --longopt= with a zero-length argument.
https://bugs.ruby-lang.org/issues/12135

* Author: Tim Baverstock
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 2.1.5 and 2.4.0
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
OptParse diverges from C's OptParse by rejecting a zero-length argument given to a long option.

C accepts it:

$ ./a.out --delete=
option delete with arg ''

Ruby fails:

OptionParser::InvalidArgument: invalid argument: --filters=




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

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next