As others have said, it depends on what you eat. A light snack 20 minutes before working out is fine, IMO. A banana 10 minutes before is fine. A heavier meal maybe 1 hour previously.
It also depends somewhat on the exercises. A while ago, I did some stability ball work a bit too soon after eating, and had to watch how I placed myself during the "lying prone over the ball" moves, or it seemed like I was causing my gastric juice to go the wrong way!