aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-12-04 16:50:44 -0500
committerGitHub <noreply@github.com>2018-12-04 16:50:44 -0500
commit1decfedb2b3d7047d9696ee054ac8778d396372c (patch)
treeb1397ccd0c8d1d45f4e4af703691adb938b969f4
parentbd62389307e138ee0f274a9d62697567a3334ea0 (diff)
parentab631b363e0bb4870fe535f3ef0d1751bfd14ae1 (diff)
downloadrails-1decfedb2b3d7047d9696ee054ac8778d396372c.tar.gz
rails-1decfedb2b3d7047d9696ee054ac8778d396372c.tar.bz2
rails-1decfedb2b3d7047d9696ee054ac8778d396372c.zip
Merge pull request #34612 from utilum/bigdecimal_raises_on_comma_in_string_argument
Another Ruby 2.6 BigDecimal compatibility issue
-rw-r--r--activesupport/lib/active_support/xml_mini.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb
index e42eee07a3..be298bf0a1 100644
--- a/activesupport/lib/active_support/xml_mini.rb
+++ b/activesupport/lib/active_support/xml_mini.rb
@@ -71,7 +71,7 @@ module ActiveSupport
begin
BigDecimal(number)
rescue ArgumentError
- BigDecimal("0")
+ BigDecimal(number.to_f.to_s)
end
else
BigDecimal(number)