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:
commit
1decfedb2b
@ -71,7 +71,7 @@ def content_type
|
||||
begin
|
||||
BigDecimal(number)
|
||||
rescue ArgumentError
|
||||
BigDecimal("0")
|
||||
BigDecimal(number.to_f.to_s)
|
||||
end
|
||||
else
|
||||
BigDecimal(number)
|
||||
|
Loading…
Reference in New Issue
Block a user