1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #34612 from utilum/bigdecimal_raises_on_comma_in_string_argument

Another Ruby 2.6 BigDecimal compatibility issue
This commit is contained in:
Rafael França 2018-12-04 16:50:44 -05:00 committed by GitHub
commit 1decfedb2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ module ActiveSupport
begin
BigDecimal(number)
rescue ArgumentError
BigDecimal("0")
BigDecimal(number.to_f.to_s)
end
else
BigDecimal(number)