Fix syntax error in previous commit

undefined method `with_index' for .. Array