leave it; or if he has sworn not to do something and then realises that doing it is better, he should do it. This ruling applies equally to the ruler and to everyone else: whenever you swear about a matter and then see that the good lies in the opposite, offer expiation for your oath and act upon the good.
Consider the following example. A man swears that he will not visit a relative because some dispute has arisen between them and says, “By Allah, I will never visit you.” He has thereby sworn to sever a family tie, whereas maintaining it is better than cutting it off. We therefore say: You must expiate for your oath and visit your relative, for such visitation counts as keeping the ties of kinship, and that is obligatory.
Another example: a man swears that he will not speak to his Muslim brother and will shun him. We say: This is a mistake—expiate for your oath and speak to him. In every situation where you swear an oath and the better course lies in the contrary of what you swore, expiate for your oath and do what is good. This is the guiding rule for all oaths.
Nevertheless, a person should not be hasty in making oaths, for many people are quick to swear—or to pronounce divorce or similar things—and then regret it afterward. Our advice is: do not rush. If you have firmly resolved upon something, then do it or leave it without an oath and without divorce.
If, however, you are afflicted by frequent swearing, attach to your oath the phrase “in shāʾ Allāh” (if Allah wills). When you swear and add “in shāʾ Allāh,” you are left at liberty: even if you act contrary to what you swore, it will not harm you.