# File lib/mail/fields/unstructured_field.rb, line 25 def initialize(name, value, charset = nil) @errors = [] if value.is_a?(Array) # Probably has arrived here from a failed parse of an AddressList Field value = value.join(', ') else # Ensure we are dealing with a string value = value.to_s end if charset self.charset = charset else if value.respond_to?(:encoding) self.charset = value.encoding else self.charset = $KCODE end end self.name = name self.value = value self end