diff -Nru sup-mail-0.12.1+git20120407.aaa852f/debian/changelog sup-mail-0.12.1+git20120407.aaa852f/debian/changelog --- sup-mail-0.12.1+git20120407.aaa852f/debian/changelog 2012-06-21 20:29:17.000000000 +0200 +++ sup-mail-0.12.1+git20120407.aaa852f/debian/changelog 2012-08-04 00:15:05.000000000 +0200 @@ -1,3 +1,10 @@ +sup-mail (0.12.1+git20120407.aaa852f-2) unstable; urgency=low + + * Updated text wrapping patch (0004) to work with Ruby 1.9. + (Closes: #683781) + + -- Per Andersson Fri, 04 Aug 2012 00:15:00 +0200 + sup-mail (0.12.1+git20120407.aaa852f-1) unstable; urgency=low * New maintainer. (Closes: #660509) diff -Nru sup-mail-0.12.1+git20120407.aaa852f/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch sup-mail-0.12.1+git20120407.aaa852f/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch --- sup-mail-0.12.1+git20120407.aaa852f/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch 2012-06-20 22:31:42.000000000 +0200 +++ sup-mail-0.12.1+git20120407.aaa852f/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch 2012-08-03 00:57:46.000000000 +0200 @@ -4,18 +4,23 @@ Crash occurs for instance when expanding GPG signatures. --- - lib/sup/modes/thread-view-mode.rb | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + lib/sup/modes/thread-view-mode.rb | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb -index 9fcc45d..2a8a237 100644 +index 9fcc45d..510f967 100644 --- a/lib/sup/modes/thread-view-mode.rb +++ b/lib/sup/modes/thread-view-mode.rb -@@ -846,7 +846,8 @@ private +@@ -846,7 +846,13 @@ private else width = buffer.content_width end - lines = lines.map { |l| l.chomp.wrap width }.flatten ++ # this function apparently takes both String and Array as input. ++ # if String convert to Array so map works. ++ if lines.kind_of? String ++ lines = lines.lines.to_a ++ end + # sometimes l is nil, avoid crash when this happens + lines = lines.map { |l| l.chomp.wrap width unless l == nil }.flatten end