1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-20 15:31:12 +00:00

MailHandler: Don't use String#respond_to?(:force_encoding) (#18047)

Contributed by Felix Schäfer.

git-svn-id: http://svn.redmine.org/redmine/trunk@13432 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-10-08 14:59:21 +00:00
parent bfe7997e38
commit 6ac8507b3b

View File

@ -421,7 +421,7 @@ class MailHandler < ActionMailer::Base
end end
@plain_text_body = parts.map do |p| @plain_text_body = parts.map do |p|
body_charset = p.charset.respond_to?(:force_encoding) ? body_charset = Mail::RubyVer.respond_to?(:pick_encoding) ?
Mail::RubyVer.pick_encoding(p.charset).to_s : p.charset Mail::RubyVer.pick_encoding(p.charset).to_s : p.charset
Redmine::CodesetUtil.to_utf8(p.body.decoded, body_charset) Redmine::CodesetUtil.to_utf8(p.body.decoded, body_charset)
end.join("\r\n") end.join("\r\n")