In Remixed Pixel Dungeon food can rot if comes into contact with toxic gas, so don't use your Ration for trap disarming. A rotten pie can drop from mimics that are disguised as one.
Food does not become rotten if it stays your inventory for too long. Also, rotten food satisfies hunger much worse than the fresh counterparts. It is not recommended to eat such food (It still can be eaten though) but you can thrown it at an enemy with a chance that a random gas effect will appear.
By throwing a piece of rotten food, the following effects can occur:
Wise adventurer can restore rotten food to it's initial state by pouring a potion of purification on it. This potion can also be used when throwing a rotten piece of food, since it blocks the effects of all gases.