Sahih Muslim 3102: Oaths
It is narrated from Tamim bin Tarafah that he said: A beggar came to Hazrat Adi bin Hatim (ra) and asked him for money towards (paying) the price of a servant, or for part of the price of a servant. He said: I have nothing to give you except my coat of mail and my helmet. I will write to my family that they should give you that sum. The narrator says: He was not satisfied. Hazrat Adi (ra) became displeased and said: By Allah, I will not give you anything. Then that man became satisfied (with that), so (Hazrat Adi (ra)) said: Listen! By Allah, had I not heard the Messenger of Allah (saw) say: “Whoever swears an oath and then sees something closer to the fear of Allah (Taqwa) than it should do that which is closer to Taqwa,” I would not have broken my oath.
AI-translated by Islam-Today