Yevamos 8:2-3
Yevamos 8:2
“Crushed testes” means that both or one has been crushed (rendering the person impotent); “severed member” means one whose genitalia has been cut off, but if even a hair’s breadth of the glans remains, he is fit to enter the general marriage pool. A man with crushed testes or a severed member is permitted to marry converts and freed slaves but he may not enter the general marriage pool as per Deuteronomy 23:2.
Yevamos 8:3
Male Ammonites and Moabites are permanently barred from entering the Jewish marriage pool but female Ammonites and Moabites (i.e., converts) may enter immediately. Egyptians and Edomites, both men and women, are barred for three generations. Rabbi Shimon permits female Egyptians and Edomites to enter immediately. He said, “If in a case where men are barred forever women may enter immediately, doesn’t it make sense that when men are barred for only three generations women should be able to enter immediately?” The Sages replied that if Rabbi Shimon received this ruling as a tradition from his teachers, they would accept it, but if it was his own inference, then they have a response. Rabbi Shimon replied that they would not be able to defeat his logic but this was in fact a ruling he had received. Mamzerim (offspring of adulterous and incestuous unions) and Gibeonites (see Joshua chapter 9) are permanently barred from the general marriage pool, both men and women.