From 6ac8507b3b3bde43f62bd25f3c86160cce09ac0f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Oct 2014 14:59:21 +0000 Subject: [PATCH] MailHandler: Don't use String#respond_to?(:force_encoding) (#18047) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Contributed by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@13432 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 2.39.5