Sahih Muslim #4279 · The Book of Oaths

Sahih MuslimTamim b. Tarafa reported that he heard 'Adi b. Hatim say that a person came to him and asked for one hundred dirhams. He
Sahih Muslim · Book 27 · The Book of Oaths
Sahih Muslim · كتاب 27 · كتاب الأيمان
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 4279In-book reference : Book 27, Hadith 26