aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-02 13:56:22 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-02 13:56:22 -0300
commitf71265f7f8b3e284ec713b995c5d5b67557a3ef6 (patch)
tree15ad774a500e749120505e8932b01a05610abec0 /activesupport/CHANGELOG.md
parent38454bb2666ca7d258a4ca2b53e16bcc3a2ee019 (diff)
parent60062cf39a6079cf6a47a754f4b5fc6c474b9b15 (diff)
downloadrails-f71265f7f8b3e284ec713b995c5d5b67557a3ef6.tar.gz
rails-f71265f7f8b3e284ec713b995c5d5b67557a3ef6.tar.bz2
rails-f71265f7f8b3e284ec713b995c5d5b67557a3ef6.zip
Merge pull request #15379 from xuanxu/rational_precision
Fix AS::NumberHelper results with rationals
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 38ec3c0753..8a9d31a7bb 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,16 @@
+* Fixed precision error in NumberHelper when using Rationals.
+
+ before:
+ ActiveSupport::NumberHelper.number_to_rounded Rational(1000, 3), precision: 2
+ #=> "330.00"
+ after:
+ ActiveSupport::NumberHelper.number_to_rounded Rational(1000, 3), precision: 2
+ #=> "333.33"
+
+ See #15379.
+
+ *Juanjo Bazán*
+
* Removed deprecated `Numeric#ago` and friends
Replacements: