Project

General

Profile

Bug #12135

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

Added by Warwick (Tim Baverstock) over 3 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
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=

History

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

What is "C's OptParse"?

#2

Updated by jeremyevans0 (Jeremy Evans) about 2 months ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF