General

Profile

wmccumstie (William McCumstie)

  • Login: wmccumstie
  • Registered on: 07/06/2017
  • Last sign in: 08/21/2019

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

07/06/2017

11:10 AM Ruby Bug #13722: OptionParser::DecimalInteger can be converted as Octal
From optparse.rb:
```
OptionParser comes with a few ready-to-use kinds of type
# coercion. They are:
#
# - Date -- Anything accepted by +Date.parse+
# - DateTime -- Anything accepted by +DateTime.parse+
# - Time -- Anything ac...
wmccumstie (William McCumstie)
10:56 AM Ruby Bug #13722: OptionParser::DecimalInteger can be converted as Octal
I don't believe it would be intended behaviour. At very least it would be strange to specifically specify a Decimal only to have it converted as Octal.
Looking into to the unit tests (test/optparse/test_acceptable.rb:115), I would hav...
wmccumstie (William McCumstie)
10:10 AM Ruby Bug #13722: OptionParser::DecimalInteger can be converted as Octal
A PR containing a bug fix can be found at:
https://github.com/ruby/ruby/pull/1665
wmccumstie (William McCumstie)
09:59 AM Ruby Bug #13722 (Closed): OptionParser::DecimalInteger can be converted as Octal
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...
wmccumstie (William McCumstie)

Also available in: Atom