Hi All,
I bumped into this today and crafted the following small patch
(against the current head of next) to handle it. If you press 'c' to
edit a Cc header (would happen on To or Bcc also), an exception is
generated if the field is currently empty. Array.join is called on
nil. The attached patch just sets the header value to an empty array
before the call to join happens.
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <[EMAIL PROTECTED]>
When one person suffers from a delusion, it is called insanity. When
many people suffer from a delusion it is called Religion.
Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance
---------------------------------------------------------------------------------------------------------------------------
From 066f28d2149a96b9fdb2e110048408847ead88ed Mon Sep 17 00:00:00 2001
From: Ben Walton <[EMAIL PROTECTED]>
Date: Fri, 16 May 2008 12:52:11 -0400
Subject: [PATCH] fix exception when editting an empty MULTI_HEADER
In edit-message-mode, an exception is generated by pressing 'c' to edit the Cc
field when no value currently exists. This is due to calling Array.join() on
nil. This patch addresses the execption by forcing an empty array when the
current value is nil.
---
lib/sup/modes/edit-message-mode.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index d52b5b4..79a1ffe 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -383,6 +383,7 @@ protected
default =
case field
when *MULTI_HEADERS
+ @header[field] ||= []
@header[field].join(", ")
else
@header[field]
--
1.5.5.1
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk