Ibn Abbas (Allah be well pleased with him) reports that a woman traveled in a boat and pledged that should Allah save her life, she would fast for a month. She was saved but she did not fast before she died. Her daughter or her sister asked the Holy Prophet about that and he ordered her to fast on behalf of the deceased woman. (Abu-Daud, Nasai, Ahmad and others).