Sa'id bin Jubayr narrates from Ibn Abbas (may Allah be pleased with him) concerning: "And those with whom you have made a pledge, give them their share." [Surah al-Nisa: 33]
When the Muhajirun came to Madinah, they used to make the Ansar heirs instead of (a man's) blood relatives, because of the brotherhood that the Prophet (peace and blessings be upon him) had established between them. Then this verse was revealed: "And for each We have appointed heirs of what parents and relatives leave." [Surah al-Nisa: 33] So it (the earlier practice) was abrogated. Then He said: "And those with whom you have made a pledge, give them their share." [Surah al-Nisa: 33] That is: help, sincere counsel and support, and he may make a bequest for them, while inheritance has ended.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21453
Mu'awiyah bin Ishaq (may Allah have mercy on him) says that a man came to the Messenger of Allah (peace and blessings be upon him) and said: So-and-so accepted Islam at my hands. He (peace and blessings be upon him) said: "He is your mawla; when you are dying, make a bequest for him."
This is mursal, and it supports the statement of Ibn Abbas about the abrogation of the verse of pledges as regards inheritance; but he makes a bequest for him and treats him kindly, and Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21454