aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-10-03 14:52:46 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-10-03 14:52:46 -0200
commit10249d7b7728525fb7660409e3bbc9e0286dbf0f (patch)
treeace749f4be3dc584f02515fa29d7a64411b6d5f1
parentc28bebef13b8a0e497fc7bbb83f542e9400e07e5 (diff)
downloadrails-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.rb2
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