Array.index can't take a block in Ruby 1.8