Skip to content

Commit fe41a9f

Browse files
byrootzzak
authored andcommitted
Merge pull request #55840 from zzak/asup-xml-mini-bigdecimal-float-precision
Always pass default precision to BigDecimal when parsing Float in XmlMini
1 parent 0a96dea commit fe41a9f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

activesupport/lib/active_support/xml_mini.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def content_type
7474
"decimal" => Proc.new do |number|
7575
if String === number
7676
number.to_d
77+
elsif Float === number
78+
BigDecimal(number, 0)
7779
else
7880
BigDecimal(number)
7981
end

0 commit comments

Comments
 (0)