From 43ccf339799293ab02e2c69b584ca3fe7bf2fb86 Mon Sep 17 00:00:00 2001 From: Rich Lane Date: Sun, 30 Aug 2009 13:28:55 -0700 Subject: [PATCH] remove use of Object#tap --- lib/sup/xapian_index.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb index 7e65a70..b5acc0f 100644 --- a/lib/sup/xapian_index.rb +++ b/lib/sup/xapian_index.rb @@ -357,7 +357,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 -- 2.43.0