Sayyiduna Anas (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) forbade "that fruit be sold before it ripens, until it turns yellow or red, and he forbade selling grapes until they turn black, and grain until it is fit to be rubbed out of the ear."
Aban bin Abi Ayyash also narrated it from Anas with the second wording, and he is not used as evidence.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10614