Implement Enumerable#each_with_object