Changing inject for each_with_object