lib/mail/header.rb in mail-2.6.1 vs lib/mail/header.rb in mail-2.6.3

- old
+ new

@@ -15,11 +15,11 @@ # except for CR and LF. However, a field body may contain CRLF when # used in header "folding" and "unfolding" as described in section # 2.2.3. All field bodies MUST conform to the syntax described in # sections 3 and 4 of this standard. class Header - include Patterns + include Constants include Utilities include Enumerable @@maximum_amount = 1000 @@ -128,10 +128,11 @@ # h = Header.new # h.fields = ['To: mikel@me.com', 'X-Mail-SPAM: 15', 'X-Mail-SPAM: 20'] # h['To'] #=> 'mikel@me.com' # h['X-Mail-SPAM'] #=> ['15', '20'] def [](name) - name = dasherize(name).downcase + name = dasherize(name) + name.downcase! selected = select_field_for(name) case when selected.length > 1 selected.map { |f| f } when !selected.blank?