b_search practice in Ruby