Subject: [sup-talk] [PATCH] svn sup "can't convert nil into String" (index.rb)

From: [email-masked] (Rick Tessner)
Date: Tue, 30 Oct 2007 03:24:15 -0700

Hi,

I'm using svn sup and just recently started getting the following error
when getting new email without a proper message_id (patch is attached):

The problem was: 'can't convert nil into String' (error type TypeError)
A backtrace follows: /home/rick/sup/lib/sup/index.rb:323:in
`initialize': can't convert nil into String (TypeError)
        from /home/rick/sup/lib/sup/index.rb:323:in `new'
        from /home/rick/sup/lib/sup/index.rb:323:in `load_entry_for_id'
        from /home/rick/sup/lib/sup/util.rb:395:in `send'
        from /home/rick/sup/lib/sup/util.rb:395:in `method_missing'
        from /home/rick/sup/lib/sup/poll.rb:156:in `add_messages_from'
        from /home/rick/sup/lib/sup/imap.rb:178:in `each'
        from /home/rick/sup/lib/sup/imap.rb:163:in `upto'
        from /home/rick/sup/lib/sup/imap.rb:163:in `each'
         ... 28 levels...
        from /home/rick/sup/lib/sup.rb:68:in `reporting_thread'
        from /home/rick/sup/lib/sup/modes/thread-index-mode.rb:372:in
`load_n_threads_background'
        from /home/rick/sup/lib/sup/modes/thread-index-mode.rb:422:in
`load_threads'
        from /home/rick/sup/bin/sup:188

The problem is that the parse_header method is assigning @id the result
of an "if" statement.  However, the "else" part of the "if" statement is
always returning the result of Redwood::log (nil) rather than the
"sup-faked" message_id.

-- 
Rick
rick.tessner at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: message.rb.diff
Type: text/x-patch
Size: 490 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071030/28a2f5be/attachment.bin

---

From: [email-masked] (William Morgan)
Date: Thu, 01 Nov 2007 19:36:02 -0700

Excerpts from rick.tessner's message of Tue Oct 30 03:24:15 -0700 2007:
> I'm using svn sup and just recently started getting the following
> error when getting new email without a proper message_id (patch is
> attached):

Gadzooks, two simultaneous patches from two different users for the same
problem! Truly a milestone in Sup's development. Thanks!

-- 
William <wmorgan-sup at masanjin.net>