Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #9768 from senny/do_not_freeze_number_helper_defaults

Do not freeze NumberHelper defaults
  • Loading branch information...
commit 491d6916c976c40bb8e0f0992f35d85ff7169d89 2 parents 1c2717d + f662a74
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/number_helper.rb
View
4 actionpack/lib/action_view/helpers/number_helper.rb
@@ -360,7 +360,7 @@ def number_with_precision(number, options = {})
end
- STORAGE_UNITS = [:byte, :kb, :mb, :gb, :tb].freeze
+ STORAGE_UNITS = [:byte, :kb, :mb, :gb, :tb]
# Formats the bytes in +number+ into a more understandable
# representation (e.g., giving it 1500 yields 1.5 KB). This
@@ -452,7 +452,7 @@ def number_to_human_size(number, options = {})
end
DECIMAL_UNITS = {0 => :unit, 1 => :ten, 2 => :hundred, 3 => :thousand, 6 => :million, 9 => :billion, 12 => :trillion, 15 => :quadrillion,
- -1 => :deci, -2 => :centi, -3 => :mili, -6 => :micro, -9 => :nano, -12 => :pico, -15 => :femto}.freeze
+ -1 => :deci, -2 => :centi, -3 => :mili, -6 => :micro, -9 => :nano, -12 => :pico, -15 => :femto}
# Pretty prints (formats and approximates) a number in a way it
# is more readable by humans (eg.: 1200000000 becomes "1.2
Please sign in to comment.
Something went wrong with that request. Please try again.