Certain caterpillars eat plants that are toxic to both themselves and the parasite to cure themselves. "Drosophila melanogaster" larvae also "self-medicate" with ethanol to treat parasitism. "D. melanogaster" females lay their eggs in food containing toxic amounts of alcohol if they detect parasitoid wasps nearby. Despite the alcohol slowing the growth of the flies, it protects them from the wasps.