When a pleading contains as a defense matter which arose after the commencement of the action, whether such matter of defense is pleaded alone or with other matter of defense which arose before the action, the party affected by such matter may confess the same, and shall be entitled to the costs of the action to the time of such pleading.