diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-03 14:52:46 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-03 14:52:46 -0200 |
commit | 10249d7b7728525fb7660409e3bbc9e0286dbf0f (patch) | |
tree | ace749f4be3dc584f02515fa29d7a64411b6d5f1 | |
parent | c28bebef13b8a0e497fc7bbb83f542e9400e07e5 (diff) | |
download | rails-10249d7b7728525fb7660409e3bbc9e0286dbf0f.tar.gz rails-10249d7b7728525fb7660409e3bbc9e0286dbf0f.tar.bz2 rails-10249d7b7728525fb7660409e3bbc9e0286dbf0f.zip |
PERF: change inject({}) with Hash + map
-rw-r--r-- | actionmailer/lib/action_mailer/old_api.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index b8c15df263..a9cdf6c0ca 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -247,7 +247,7 @@ module ActionMailer [ nil, {} ] else ctype, *attrs = @content_type.split(/;\s*/) - attrs = attrs.inject({}) { |h,s| k,v = s.split(/\=/, 2); h[k] = v; h } + attrs = Hash[attrs.map { |attr| attr.split(/\=/, 2) }] [ctype, {"charset" => @charset}.merge(attrs)] end end |