aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-09-19 16:41:45 +0200
committerYves Senn <yves.senn@gmail.com>2015-09-19 16:41:45 +0200
commit8641f4afd661f0f62a78833872202a2082d70004 (patch)
tree48a871b9952176c25b73f75c778ea9e7c9cafba8
parent0c39a022b0b432afff240c5624dadee00da8d175 (diff)
parent501647ddbbc9691da1b0452fb97ce1a3a5f4570e (diff)
downloadrails-8641f4afd661f0f62a78833872202a2082d70004.tar.gz
rails-8641f4afd661f0f62a78833872202a2082d70004.tar.bz2
rails-8641f4afd661f0f62a78833872202a2082d70004.zip
Merge pull request #21676 from amitsuroliya/correct_result
Corrected numeric conversions output [ci skip]
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/conversions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb
index 0c8ff79237..d5bb11deed 100644
--- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb
@@ -41,7 +41,7 @@ class Numeric
# 1000.to_s(:percentage, delimiter: '.', separator: ',') # => 1.000,000%
# 302.24398923423.to_s(:percentage, precision: 5) # => 302.24399%
# 1000.to_s(:percentage, locale: :fr) # => 1 000,000%
- # 100.to_s(:percentage, format: '%n %') # => 100 %
+ # 100.to_s(:percentage, format: '%n %') # => 100.000 %
#
# Delimited:
# 12345678.to_s(:delimited) # => 12,345,678
@@ -78,7 +78,7 @@ class Numeric
# 1234567.to_s(:human_size, precision: 2) # => 1.2 MB
# 483989.to_s(:human_size, precision: 2) # => 470 KB
# 1234567.to_s(:human_size, precision: 2, separator: ',') # => 1,2 MB
- # 1234567890123.to_s(:human_size, precision: 5) # => "1.1229 TB"
+ # 1234567890123.to_s(:human_size, precision: 5) # => "1.1228 TB"
# 524288000.to_s(:human_size, precision: 5) # => "500 MB"
#
# Human-friendly format: