summaryrefslogtreecommitdiffstats
path: root/app/models/mail_handler.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-10-08 14:59:21 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-10-08 14:59:21 +0000
commit6ac8507b3b3bde43f62bd25f3c86160cce09ac0f (patch)
treef5ba63a63b9315ae04a90c4769b692e11094778b /app/models/mail_handler.rb
parentbfe7997e38cc2eb8f18bf58117d50e15130bd5de (diff)
downloadredmine-6ac8507b3b3bde43f62bd25f3c86160cce09ac0f.tar.gz
redmine-6ac8507b3b3bde43f62bd25f3c86160cce09ac0f.zip
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
Diffstat (limited to 'app/models/mail_handler.rb')
-rw-r--r--app/models/mail_handler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index dab7a1a82..2687e8e1e 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -421,7 +421,7 @@ class MailHandler < ActionMailer::Base
end
@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
Redmine::CodesetUtil.to_utf8(p.body.decoded, body_charset)
end.join("\r\n")