Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] remove use of Object#tap
@ 2009-08-30 20:28 Rich Lane
  2009-08-30 20:45 ` Blake Burkhart
  2009-09-01  3:17 ` William Morgan
  0 siblings, 2 replies; 6+ messages in thread
From: Rich Lane @ 2009-08-30 20:28 UTC (permalink / raw)


---
 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
-- 
1.6.0.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-01  3:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-30 20:28 [sup-talk] [PATCH] remove use of Object#tap Rich Lane
2009-08-30 20:45 ` Blake Burkhart
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox