From: goligautham@...
Date: 2018-03-24T15:35:36+00:00
Subject: [ruby-core:86280] [Ruby trunk Bug#14629] Option Parser parsing error

Issue #14629 has been reported by xz0r (xz0r xz0r).

----------------------------------------
Bug #14629: Option Parser parsing error
https://bugs.ruby-lang.org/issues/14629

* Author: xz0r (xz0r xz0r)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
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)


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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>