diff options
author | brainopia <brainopia@evilmartians.com> | 2015-04-02 02:11:07 +0300 |
---|---|---|
committer | brainopia <brainopia@evilmartians.com> | 2015-04-02 02:15:07 +0300 |
commit | 58d75fd8112d27c0f4bdd004e10b4f4e8b350595 (patch) | |
tree | 2708205fb412b55f1dea947da22aaed47c1fd485 /activesupport/lib/active_support/number_helper/number_to_human_converter.rb | |
parent | cdac52e124769909b6cb5fce2c4d00e09d21e059 (diff) | |
download | rails-58d75fd8112d27c0f4bdd004e10b4f4e8b350595.tar.gz rails-58d75fd8112d27c0f4bdd004e10b4f4e8b350595.tar.bz2 rails-58d75fd8112d27c0f4bdd004e10b4f4e8b350595.zip |
Freeze static arguments for gsub
Diffstat (limited to 'activesupport/lib/active_support/number_helper/number_to_human_converter.rb')
-rw-r--r-- | activesupport/lib/active_support/number_helper/number_to_human_converter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/number_helper/number_to_human_converter.rb b/activesupport/lib/active_support/number_helper/number_to_human_converter.rb index 273ca4cb48..5c6fe2df83 100644 --- a/activesupport/lib/active_support/number_helper/number_to_human_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_human_converter.rb @@ -23,7 +23,7 @@ module ActiveSupport unit = determine_unit(units, exponent) rounded_number = NumberToRoundedConverter.convert(number, options) - format.gsub('%n', rounded_number).gsub('%u', unit).strip + format.gsub('%n'.freeze, rounded_number).gsub('%u'.freeze, unit).strip end private |