It really depends on the person. You have to experiment and find out how soon after eating you can workout without getting sick or feeling heavy or lacking energy. If you eat something heavy, your energy is going to go to your stomach to digest your food. I once ate an odwalla bar 10 minutes before going on a run and it was the worst run ever, nauseus and low energy. I usually have to wait until I have a pretty empty stomach to run, but not actively growling. It's touchy. On the other hand, if it's a gym class without any jumping like Pilates, I don't really need to pay attention to what or how soon I've eaten (I just can't workout hungry).
Coral in Portland, OR