From b5c1bcbd4c25618574f94e683773647906f023e0 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Sun, 24 Feb 2008 14:31:52 -0800 Subject: [PATCH] giving a block to PollManager#each_message_in_source is now optional The block is only there to allow tweaks to the message before insertion. It's perfectly useful to call this method without the block. --- lib/sup/poll.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index 2dd9150..d32c893 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -156,7 +156,7 @@ EOS docid, entry = Index.load_entry_for_id m.id HookManager.run "before-add-message", :message => m - m = yield(m, offset, entry) or next + m = yield(m, offset, entry) or next if block_given? Index.sync_message m, docid, entry UpdateManager.relay self, :added, m unless entry rescue MessageFormatError => e -- 2.45.2