Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: bburky@bburky.com (Blake Burkhart)
Subject: [sup-talk] [PATCH] remove use of Object#tap
Date: Sun, 30 Aug 2009 15:45:48 -0500	[thread overview]
Message-ID: <1251664798-sup-8169@Backspace.local> (raw)
In-Reply-To: <1251664135-1383-1-git-send-email-rlane@club.cc.cmu.edu>

Excerpts from Rich Lane's message of Sun Aug 30 15:28:55 -0500 2009:
> ---
>  lib/sup/xapian_index.rb |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
> index c260728..1395601 100644
> --- a/lib/sup/xapian_index.rb
> +++ b/lib/sup/xapian_index.rb
> @@ -362,7 +362,9 @@ class XapianIndex < BaseIndex
>    end
>  
>    def find_docid id
> -    term_docids(mkterm(:msgid,id)).tap { |x| fail unless x.size <= 1 }.first
> +    docids = term_docids(mkterm(:msgid,id))
> +    fail unless docids.size <= 1
> +    docids.first
>    end
>  
>    def find_doc id

After applying this on next in hopes it lets me run sup on ruby 1.8.6, it
doesn't work.

It crashed with this log:
$ SUP_INDEX=xapian ruby -Ilib bin/sup-sync --all --all-sources --restore ~/dumpfile
Loading state dump from /Users/blake/dumpfile...
Read 6790 entries from dump file.
Scanning maildir:/Users/blake/Mail/bburky/INBOX...
[Sun Aug 30 15:38:57 -0500 2009] hook: read 'before-add-message' from /Users/blake/.sup/hooks/before-add-message.rb
[Sun Aug 30 15:38:57 -0500 2009] hook[before-add-message]: Marking message 1234774373-sup-1128 at zo as suptalk, subject is 'Re: [sup-talk] (no subject)'
./lib/sup/label.rb:64:in `<<': expecting a symbol (ArgumentError)
	from ./lib/sup/util.rb:520:in `send'
	from ./lib/sup/util.rb:520:in `method_missing'
	from ./lib/sup/xapian_index.rb:114:in `sync_message'
	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:189:in `each'
	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:189:in `each_key'
	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:189:in `each'
	from ./lib/sup/xapian_index.rb:114:in `sync_message'
	from ./lib/sup/xapian_index.rb:87:in `add_message'
	 ... 10 levels...
	from ./lib/sup/util.rb:520:in `method_missing'
	from bin/sup-sync:146
	from bin/sup-sync:141:in `each'
	from bin/sup-sync:141

However, I'm having other odd problems too with labels anyway. On the ferret
version of sup, I'm not able to apply labels with the 'l' command. However, I
have a hook for applying a label from the List-ID that does still work. So
this patch may or may not work, I think I'm possibly having problems of my
own.

Actually, I haven't tried to restore from a dumpfile for ferret. I'll do that
later and see if it works.

-- Blake Burkhart


  reply	other threads:[~2009-08-30 20:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30 20:28 Rich Lane
2009-08-30 20:45 ` Blake Burkhart [this message]
2009-08-30 21:50   ` Blake Burkhart
2009-08-30 23:55     ` Ben Walton
2009-08-31  0:50       ` Rich Lane
2009-09-01  3:17 ` William Morgan

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=1251664798-sup-8169@Backspace.local \
    --to=bburky@bburky.com \
    /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