Issue #13848 has been updated by kernigh (George Koehler).


`Float('200.')` also raises ArgumentError. In this way, BigDecimal.new seems consistent with Float. But it's strange that `Float('200hello world')` raises ArgumentError but `BigDecimal.new('200hello world')` succeeds.

----------------------------------------
Bug #13848: BigDecimal.new('200.') raises an exception
https://bugs.ruby-lang.org/issues/13848#change-66520

* 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: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>