Remove mutation of argument string

develop
Guillaume DOTT 2013-09-10 14:59:40 +02:00
parent e790ac07c4
commit f049777a00
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module Biju
attr_accessor :type_of_address, :number
def self.encode(number, type_of_address: :international)
number << 'F' if number.length.odd?
number = number + 'F' if number.length.odd?
new(
number.scan(/../).map(&:reverse).join,
type_of_address: type_of_address