Abdul-Rahman bin Samura reported that the Prophet ﷺ said to him, "Abdul-Rahman bin Samura, when you swear an oath and then see that something else is better than it, do what is better and make expiation for your oath."Abu Dawud said, "I heard Ahmad allow the expiation to be made before breaking the oath." He cited the wording, "So make expiation for your oath, then do what is better."
حدثنا يحيى بن خلف حدثنا عبد الأعلى حدثنا سعيد عن قتادة عن الحسن عن عبد الرحمن بن سمرة نحوه قال فكفر عن يمينك ثم ائت الذي هو خير