It is narrated from Hazrat Adi bin Hatim (may Allah be pleased with him) that a man came to him and asked him for one hundred dirhams. He said, "You are asking me for only one hundred dirhams while I am the son of Hatim Tai. By Allah, I will not give you anything." Then he said, "I heard the Noble Prophet (peace and blessings be upon him) say: Whoever swears an oath about something and then sees something better, let him do that which is better (and offer expiation for his oath)."
Hadith Referenceمسند احمد / أول مسند الكوفيين / 18265