When human females are pregnant, they're advised to stay away from alcohol, for fear of harming the fetus. And most parents refrain from giving their infants bottles full of whiskey or beer, for obvious reasons.
But if you're a fruit fly, literally dousing your offspring in alcohol is apparently one of the best ways to protect them from danger, particularly from certain types of wasps.
How and why?
Let's back up a bit. First, certain types of wasps prey on fruit flies by injecting eggs inside fruit fly larvae. Unless an infected larva kills the wasp egg, it hatches and the wasp larva eats its way out from inside the fruit fly larva, killing it.
One way for fruit fly moms to protect against this gruesome fate is to lay their eggs in an alcohol soaked environment, such as fermenting fruit, when they see that parasitic wasps are around. Although alcohol is toxic to fruit flies, it's even more toxic to wasps, which, unlike fruit flies, have not evolved a high level of alcohol tolerance. So if the larvae eat enough alcohol rich food, it can kill the wasp egg and keep it from hatching.
Protecting young
Apparently, fruit flies are not the only fly species to use alcohol to protect their young. In fact, it seems that most flies that eat rotting fruit use the alcohol defense against wasps. So fruit flies are not unique in this regard, but they're still mighty impressive.