When the gender before hand is you in the form of 'tu'.
The verb for eating is strange in that for both I (Je) and He/she/it (Il/Elle etc) the ending is the same 'mange' they are normally different. But for 'tu' it is different and is 'manges'.
I was told by a very beautiful French speaking friend of mine that apple is feminine because it is technically a baby. and only women can bare babies. lol I thought that was a pretty awesome way of explaining it.