lib/mail_address/address.rb in mail_address-1.2.13 vs lib/mail_address/address.rb in mail_address-1.2.14

- old
+ new

@@ -26,20 +26,20 @@ return @original.gsub(/[;,]/, '') if @address.nil? email_address = enquote ? quoted_address : @address if !@phrase.nil? && @phrase.length > 0 then - if @phrase.match(/\A\(/) && @phrase.match(/\)\z/) - addr.push(email_address) if !@address.nil? && @address.length > 0 - addr.push(@phrase) - else + # if @phrase.match(/\A\(/) && @phrase.match(/\)\z/) + # addr.push(email_address) if !@address.nil? && @address.length > 0 + # addr.push(@phrase) + # else addr.push( @phrase.match(/^(?:\s*#{ATEXT}\s*)+$/) ? @phrase : @phrase.match(/(?<!\\)"/) ? @phrase : %Q("#{@phrase}") ) addr.push "<#{email_address}>" if !@address.nil? && @address.length > 0 - end + # end elsif !@address.nil? && @address.length > 0 then addr.push(email_address) end addr.join(' ') end