How about `heap.each.with_index.all? &:==` ?