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

Description updated

Thank you, it's obviously a bug.

----------------------------------------
Bug #13722: OptionParser::DecimalInteger can be converted as Octal
https://bugs.ruby-lang.org/issues/13722#change-65658

* Author: wmccumstie (William McCumstie)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-07-03 trunk 59255) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
OptionParser::DecimalInteger will convert in octal format for input values that start with a '0'. In the attached script, an input of '035' will be converted to 29.

Script Output:

```
$: ./ruby-op-octal-bug.rb 
Input: 035
Parsed: 29
```

---Files--------------------------------
ruby-op-octal-bug.rb (332 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>