From 58d75fd8112d27c0f4bdd004e10b4f4e8b350595 Mon Sep 17 00:00:00 2001 From: brainopia Date: Thu, 2 Apr 2015 02:11:07 +0300 Subject: Freeze static arguments for gsub --- .../lib/active_support/number_helper/number_to_human_converter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/number_helper/number_to_human_converter.rb') 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 -- cgit v1.2.3