Project

General

Profile

Actions

Bug #14629

closed

Option Parser bug

Added by xz0r (xz0r xz0r) over 6 years ago. Updated over 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
[ruby-core:86280]

Description

Reproduce process:

Case 1:
$ruby testarg.rb --fail-if-changed
"fail if change arg provided"

Case 2:
$ruby testarg.rb --fail-if-change
"fail if change arg provided"

Case 3:
$ruby testarg.rb --fail-if-chang
"fail if change arg provided"

Expected result:

Only case 1 is valid because only one argument is defined "--fail-if-changed", case 2 and 3 should return error but they parse arguments wrongly,


Files

testarg.rb (194 Bytes) testarg.rb xz0r (xz0r xz0r), 03/24/2018 03:32 PM
Actions #1

Updated by xz0r (xz0r xz0r) over 6 years ago

  • Subject changed from Option Parser parsing error to Option Parser parsing bug
Actions #2

Updated by xz0r (xz0r xz0r) over 6 years ago

  • Subject changed from Option Parser parsing bug to Option Parser bug
Actions #3

Updated by xz0r (xz0r xz0r) over 6 years ago

  • ruby -v changed from ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16] to ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Open to Rejected

It is a spec, the long option name completion, so that users do not have to type the whole option name.

Updated by xz0r (xz0r xz0r) over 6 years ago

nobu (Nobuyoshi Nakada) wrote:

It is a spec, the long option name completion, so that users do not have to type the whole option name.

Thanks ! Sorry for the false positive

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0