Project

General

Profile

Actions

Bug #12135

closed

OptParse rejects --longopt= with a zero-length argument.

Added by Warwick (Tim Baverstock) about 8 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.1.5 and 2.4.0
[ruby-core:74092]

Description

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=
Actions

Also available in: Atom PDF

Like0
Like0Like0