Ruby/Bsearch is a binary search library for Ruby. It can search the FIRST or LAST occurrence in an array with a condition given by a block. WWW: http://0xcc.net/ruby-bsearch/