From: Bob Showalter Date: 2005-11-15T02:51:24+09:00 Subject: Re: [QUIZ][SOLUTION] Index and Query (#54) Bob Showalter wrote: > # finds documents containing all of the specified terms. > # if a block is given, each document is supplied to the > # block, and nil is returned. Otherwise, an array of > # documents is returned. > def find(*terms) > @index.each do |document, mask| > if terms.all? { |term| @terms[term] && mask[@terms[term]] != 0 } > yield document > end > end > end Oops, that comment is wrong. You must supply a block. I forgot to go back and add the support for returning an array.