...define "right before." Do you mean in the car on your way to the gym? Or a meal an hour before?
You really shouldn't have anything in your stomach while in the gym, IMO. Trying to eat and digest at the same time will degrade the quality of one or both.
Eat a good meal (protein, carbs, fats, fiber) a couple hours before your workout, and if you need something, then drink a little bit of your post-workout shake just before your workout (like in the car on your way to the gym).
Another reason not to eat heavy before your workout is that you don't want anything still in your stomach when you slam your post-workout shake (which should be simple carbs and whey protein; no fats, no fiber). Save the heavy meal for about an hour after your workout.