Project

General

Profile

Actions

Defect #4509

closed

mail_handle.rb tries to run .match on an array

Added by Erik Ordway over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
2009-12-31
Due date:
% Done:

0%

Estimated time:
Resolution:
No feedback
Affected version:

Description

use to_s and not to_a as arrays do not have .match

/app/models/mail_handler.rb
@@ -94,9 +95,9 @@
       else
         # ignoring it
       end
-    elsif m = email.subject.match(ISSUE_REPLY_SUBJECT_RE)
+    elsif m = email.subject.to_s.match(ISSUE_REPLY_SUBJECT_RE)
       receive_issue_reply(m[1].to_i)
-    elsif m = email.subject.match(MESSAGE_REPLY_SUBJECT_RE)
+    elsif m = email.subject.to_s.match(MESSAGE_REPLY_SUBJECT_RE)
       receive_message_reply(m[1].to_i)
     else
       receive_issue
Actions #1

Updated by Jean-Philippe Lang over 14 years ago

Please provide a failing test.

Actions #2

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from New to Closed
  • Resolution set to No feedback
Actions

Also available in: Atom PDF