diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-18 08:53:48 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-18 08:53:48 -0700 |
commit | 491d6916c976c40bb8e0f0992f35d85ff7169d89 (patch) | |
tree | b88cdc04d2ea987ad046c5bff14bceb8c7d37e88 /actionpack/lib/action_view/helpers/number_helper.rb | |
parent | 1c2717d3f5a3ce0ea97f832d1d008e053ad47acd (diff) | |
parent | f662a748a5d55159e1fae125a7b28695854141a2 (diff) | |
download | rails-491d6916c976c40bb8e0f0992f35d85ff7169d89.tar.gz rails-491d6916c976c40bb8e0f0992f35d85ff7169d89.tar.bz2 rails-491d6916c976c40bb8e0f0992f35d85ff7169d89.zip |
Merge pull request #9768 from senny/do_not_freeze_number_helper_defaults
Do not freeze NumberHelper defaults
Diffstat (limited to 'actionpack/lib/action_view/helpers/number_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index b627c77dca..4519230fda 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -360,7 +360,7 @@ module ActionView 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 @@ module ActionView 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 |