]> source.dussan.org Git - redmine.git/commitdiff
MailHandler: Don't use String#respond_to?(:force_encoding) (#18047)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Oct 2014 14:59:21 +0000 (14:59 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Oct 2014 14:59:21 +0000 (14:59 +0000)
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

index dab7a1a8227673199e3a8dbaf3685b4d1e3f4455..2687e8e1e90f603e595d34fa6b6a8232be241d4d 100644 (file)
@@ -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")