Issue #13722 has been reported by wmccumstie (William McCumstie).

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

* Author: wmccumstie (William McCumstie)
* Status: Open
* 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>