From: ded@... Date: 2017-08-30T11:21:43+00:00 Subject: [ruby-core:82534] [Ruby trunk Bug#13848] BigDecimal.new('200.') raises an exception Issue #13848 has been updated by ddoherty03 (Daniel Doherty). Robert, yes, I think it should be the same as BigDecimal.new('200.'). The problem arises, not when a programmer is typing the number---requiring a programmer to be explicit is OK by me---but when strings are processed that come from a user of the code. ss = '200.' # Read from a user-prepared file. BigDecimal.new(ss) => ArgumentError ... As it is, the programmer has to massage every string to recognize a reasonable, albeit a bit sloppy, string that is clearly meant as a valid number. Regards, ---------------------------------------- Bug #13848: BigDecimal.new('200.') raises an exception https://bugs.ruby-lang.org/issues/13848#change-66343 * Author: ddoherty03 (Daniel Doherty) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- BigDecimal.new('200.') raises an exception: ArgumentError: invalid value for BigDecimal(): "200." It should accept this as a valid decimal number. This requires fixing numbers read in from the wild. -- https://bugs.ruby-lang.org/ Unsubscribe: