Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/scsmith/mail into scsmith…
Browse files Browse the repository at this point in the history
…-master
  • Loading branch information
Mikel Lindsaar committed Apr 16, 2011
2 parents 67f6607 + 3e5e37f commit e9e908e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/mail/header.rb
Expand Up @@ -73,7 +73,8 @@ def fields
# h.fields = ['From: mikel@me.com', 'To: bob@you.com']
def fields=(unfolded_fields)
@fields = Mail::FieldList.new
unfolded_fields.each do |field|
warn "Warning: more than 1000 header fields only using the first 1000" if unfolded_fields.length > 1000
unfolded_fields[0..1000].each do |field|

field = Field.new(field, nil, charset)
field.errors.each { |error| self.errors << error }
Expand Down
4 changes: 2 additions & 2 deletions lib/mail/version_specific/ruby_1_9.rb
Expand Up @@ -96,8 +96,8 @@ def Ruby19.fix_encoding(encoding)
when /iso-?(\d{4})-?(\w{1,2})/i then return "ISO-#{$1}-#{$2}"
# "ISO-2022-JP-KDDI" and alike
when /iso-?(\d{4})-?(\w{1,2})-?(\w*)/i then return "ISO-#{$1}-#{$2}-#{$3}"
# utf-8 and alike
when /utf-?(.*)/i then return "UTF-#{$1}"
# UTF-8, UTF-32BE and alike
when /utf-?(\d{1,2})?(\w{1,2})/i then return "UTF-#{$1}#{$2}"
# Windows-1252 and alike
when /Windows-?(.*)/i then return "Windows-#{$1}"
#more aliases to be added if needed
Expand Down

0 comments on commit e9e908e

Please sign in to comment.