(3) باب نَدْبِ مَنْ حَلَفَ يَمِينًا فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا أَنْ يَأْتِيَ الَّذِي هُوَ خَيْرٌ وَيُكَفِّرَ عَنْ يَمِينِهِ
Tamim b. Tarafa reported that he heard 'Adi b. Hatim say that a person came to him and asked for one hundred dirhams. He ('Adi) said:
You asked me for one hundred dirhams and I am the son of Hatim; by Allah, I will not give you. But then he said: (I would have done that) if I had not heard Allah's Messenger (ﷺ) say: He who takes an oath, but then finds something better than that, should do that which is better.
Reference: Sahih Muslim 1651 e
In-book reference: Book 27, Hadith 26
USC-MSA web (English) reference(deprecated numbering scheme): Book 15, Hadith 4060