Binary Search with ruby, tested with Rspec