aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/number_helper/number_to_phone_converter.rb')
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_phone_converter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb b/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
index dee74fa7a6..96410f4995 100644
--- a/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
@@ -1,8 +1,10 @@
+# frozen_string_literal: true
+
module ActiveSupport
module NumberHelper
class NumberToPhoneConverter < NumberConverter #:nodoc:
def convert
- str = country_code(opts[:country_code])
+ str = country_code(opts[:country_code]).dup
str << convert_to_phone_number(number.to_s.strip)
str << phone_ext(opts[:extension])
end
@@ -51,8 +53,6 @@ module ActiveSupport
def regexp_pattern(default_pattern)
opts.fetch :pattern, default_pattern
end
-
end
end
end
-