From: shyouhei@... Date: 2017-07-06T10:19:36+00:00 Subject: [ruby-core:81929] [Ruby trunk Bug#13722] OptionParser::DecimalInteger can be converted as Octal Issue #13722 has been updated by shyouhei (Shyouhei Urabe). I wonder if this is a bug or an intended behaviour. ---------------------------------------- Bug #13722: OptionParser::DecimalInteger can be converted as Octal https://bugs.ruby-lang.org/issues/13722#change-65653 * 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: