Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Hamish D <dmishd@gmail.com>
To: Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [PATCH] Don't fail on empty lines while expanding
Date: Sat, 17 Dec 2011 18:46:07 +0000	[thread overview]
Message-ID: <CAOxvSbc_S9grJVZxjTT3e1jepE53y9Y5ZYgy-n9QRboVMQvLzA@mail.gmail.com> (raw)
In-Reply-To: <1318500554-sup-8811@qwerzila>

Applied to next.

Hamish

On 13 October 2011 11:10, Gaute Hope <eg@gaute.vetsj.com> wrote:
> While expanding an GPG signature which must have contained a line that
> ended up as nil while chomp'ing, chomp will crash. This patch filters
> out lines which are nil.
> ---
>  lib/sup/modes/thread-view-mode.rb |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
> index 9fcc45d..ec1a82e 100644
> --- a/lib/sup/modes/thread-view-mode.rb
> +++ b/lib/sup/modes/thread-view-mode.rb
> @@ -846,7 +846,7 @@ private
>       else
>         width = buffer.content_width
>       end
> -      lines = lines.map { |l| l.chomp.wrap width }.flatten
> +      lines = lines.map { |l| l.chomp.wrap width if l }.flatten
>     end
>     return lines
>   end
> --
> 1.7.7
>
> _______________________________________________
> Sup-devel mailing list
> Sup-devel@rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-devel
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

      reply	other threads:[~2011-12-17 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 10:10 Gaute Hope
2011-12-17 18:46 ` Hamish D [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOxvSbc_S9grJVZxjTT3e1jepE53y9Y5ZYgy-n9QRboVMQvLzA@mail.gmail.com \
    --to=dmishd@gmail.com \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox