diff --git a/lib/biju/pdu/phone_number.rb b/lib/biju/pdu/phone_number.rb index 8ecdda8..a52a67c 100644 --- a/lib/biju/pdu/phone_number.rb +++ b/lib/biju/pdu/phone_number.rb @@ -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