mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make both conversion methods work similarly
The conversion without area code already changed the passed number in place, so change the other method to do the same.
This commit is contained in:
parent
308ed01f14
commit
a63d8cd9e1
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,8 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def convert_with_area_code(number)
|
||||
number.gsub(/(\d{1,3})(\d{3})(\d{4}$)/,"(\\1) \\2#{delimiter}\\3")
|
||||
number.gsub!(/(\d{1,3})(\d{3})(\d{4}$)/,"(\\1) \\2#{delimiter}\\3")
|
||||
number
|
||||
end
|
||||
|
||||
def convert_without_area_code(number)
|
||||
|
|
Loading…
Reference in a new issue