Project

General

Profile

Actions

Bug #13722

closed

OptionParser::DecimalInteger can be converted as Octal

Added by wmccumstie (William McCumstie) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-07-03 trunk 59255) [x86_64-linux]
[ruby-core:81927]

Description

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) ruby-op-octal-bug.rb Reproduces the bug wmccumstie (William McCumstie), 07/06/2017 09:58 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0