`each_with_index` is probably a bit cleaner.