Issue #14629 has been updated by nobu (Nobuyoshi Nakada).

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.

----------------------------------------
Bug #14629: Option Parser bug
https://bugs.ruby-lang.org/issues/14629#change-71196

* Author: xz0r (xz0r xz0r)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [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>