There are digestive enzymes on the market that solve digestive gas for beans, legumes, lentils, peanuts, broccoli, etc. You take one or a few at your first bite, and problem solved. Bean-zyme is the most popular in the US apparently. Vegan and international options are NOW's Optimal Digestive System, Bulk, California Gold's Digestive Enzymes, and Bulk's Digezymes. Your mileage may vary.