 After the fact, various Jewish and secular legal methods are used to deal with such problems.None of the legal solutions addresses the agunah problem in the case of a missing husband.The Midrash is one of the few ancient religious texts that makes reference to same-sex marriage.