From 2256f0bdb09a39a8752183e3422b76e1cd05df1a Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Mon, 20 May 2019 17:58:35 +0200 Subject: Correct human file size examples [ci skip] The `number_to_human_size` helpers in Action View and Active Support calculate the "human size" with a base of 1024. The examples should reflect that so they don't confuse the reader. The updated documentations use the values from: helper.number_to_human_size(1500) --- actionview/lib/action_view/helpers/number_helper.rb | 2 +- activesupport/lib/active_support/number_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index 35206b7e48..03ec7df9c1 100644 --- a/actionview/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb @@ -251,7 +251,7 @@ module ActionView end # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.5 KB). This + # representation (e.g., giving it 1500 yields 1.46 KB). This # method is useful for reporting file sizes to users. You can # customize the format in the +options+ hash. # diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb index d19a2f64d4..8f3d04aa5c 100644 --- a/activesupport/lib/active_support/number_helper.rb +++ b/activesupport/lib/active_support/number_helper.rb @@ -228,7 +228,7 @@ module ActiveSupport end # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.5 KB). This + # representation (e.g., giving it 1500 yields 1.46 KB). This # method is useful for reporting file sizes to users. You can # customize the format in the +options+ hash. # -- cgit v1.2.3