aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2014-08-22 18:27:30 -0700
committerZachary Scott <e@zzak.io>2014-08-22 18:27:30 -0700
commit9bf2e5ec305bcb5aa7713fea66ac0fbfbad0612a (patch)
tree41db4f2aeecb2ca1e3c4497f45b60b579211f38f /activesupport/lib/active_support
parent2602a49a8600ab52f807599bbd5b1f9c0be4214f (diff)
downloadrails-9bf2e5ec305bcb5aa7713fea66ac0fbfbad0612a.tar.gz
rails-9bf2e5ec305bcb5aa7713fea66ac0fbfbad0612a.tar.bz2
rails-9bf2e5ec305bcb5aa7713fea66ac0fbfbad0612a.zip
Use zero-padding for number_to_rounded_converter
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb b/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb
index 47028e9ecf..dcf9a567e8 100644
--- a/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb
@@ -33,7 +33,7 @@ module ActiveSupport
a, b = s.split('.', 2)
a + '.' + b[0, precision]
else
- "%01.#{precision}f" % rounded_number
+ "%00.#{precision}f" % rounded_number
end
delimited_number = NumberToDelimitedConverter.convert(formatted_string, options)