# File lib/wordnet/lexicon.rb, line 220 def grep( text ) return [] if text.empty? words = [] # Grab a cursor into the database and fetch while the key matches # the target text cursor = @indexDb.cursor rec = cursor.set_range( text ) while /^#{text}/ =~ rec[0] words.push rec[0] rec = cursor.next end cursor.close return *words end