Skip to content

Commit 1decfed

Browse files
authored
Merge pull request rails#34612 from utilum/bigdecimal_raises_on_comma_in_string_argument
Another Ruby 2.6 BigDecimal compatibility issue
2 parents bd62389 + ab631b3 commit 1decfed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activesupport/lib/active_support/xml_mini.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def content_type
7171
begin
7272
BigDecimal(number)
7373
rescue ArgumentError
74-
BigDecimal("0")
74+
BigDecimal(number.to_f.to_s)
7575
end
7676
else
7777
BigDecimal(number)

0 commit comments

Comments
 (0)