summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-10-10 15:25:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-10-10 15:25:34 +0000
commitd8ba5c2a069b02709ad5fa11deb341d6cc5aae62 (patch)
tree571aa5d3bd08b9d8b6d98bd0a782f8626a93d7a2 /app
parent4450e6f24b30bb11f644dfac23f8bfac0bec1562 (diff)
downloadredmine-d8ba5c2a069b02709ad5fa11deb341d6cc5aae62.tar.gz
redmine-d8ba5c2a069b02709ad5fa11deb341d6cc5aae62.zip
Fixes MailHandler for ruby1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2915 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/mail_handler.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 7d868d5d2..8686c6b01 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -81,7 +81,7 @@ class MailHandler < ActionMailer::Base
if headers.detect {|h| h.to_s =~ MESSAGE_ID_RE}
klass, object_id = $1, $2.to_i
method_name = "receive_#{klass}_reply"
- if self.class.private_instance_methods.include?(method_name)
+ if self.class.private_instance_methods.collect(&:to_s).include?(method_name)
send method_name, object_id
else
# ignoring it
@@ -120,7 +120,8 @@ class MailHandler < ActionMailer::Base
if status && issue.new_statuses_allowed_to(user).include?(status)
issue.status = status
end
- issue.subject = email.subject.chomp.toutf8
+ issue.subject = email.subject.chomp
+ issue.subject = issue.subject.toutf8 if issue.subject.respond_to?(:toutf8)
if issue.subject.blank?
issue.subject = '(no subject)'
end