Abu Dawud Book 21, Hadith Number 3744.
Narated By Abdullah Ibn Abbas : When the verse: “O ye who believe! eat not up your property among yourselves in vanities, but let there be amongst you traffic and trade by mutual good will” was revealed, a man thought it a sin to eat in the house of another man after the revelation of this verse.
Then this (injunction) was revealed by the verse in Surat an-Nur: “No blame on you whether you eat in company or separately.”
When a rich man (after revelation) invited a man from his people to eat food in his house, he would say: I consider it a sin to eat from it, and he said: a poor man is more entitled to it than I. The Arabic word tajannah means sin or fault. It was then declared lawful to eat something on which the name of Allah was mentioned, and it was made lawful to eat the flesh of an animal slaughtered by the people of the Book.