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

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