The Mishnah was one of the first compiled books in Judaism after the giving of Torah (bible), and intersex was already a subject matter showing the prevalence in humanity for thousands of years.
1/1500 children born will be under the intersex umbrella, with hundreds of variations contained within it. I myself have PMDS, therefore am intersex.
The rules were pretty much 'undecided' other than application of 'Jewish law'.
"The hermaphrodite is in some ways like men, and in other ways like women. In other ways he is like men and women, and in others he is like neither men nor women.
In what ways is he like men? He causes impurity with white discharge, like men; He dresses like men; He can take a wife but not be taken as a wife, like men. [When he is born] his mother counts the blood of purification, like men; He may not be secluded with women, like men. He is not maintained with the daughters, like men; He transgresses the law of: “You shall not round” (Leviticus 19:2 and “You shall not defile for the dead,” (Leviticus 21:1) like men; And he must perform all the commandments of the Torah, like men.
:
And in what ways is he like women? He causes impurity with red discharge, like women; And he must not be secluded with men, like women; And he doesn’t make his brother’s wife liable for yibbum (levirate marriage); And he does not share [in the inheritance] with the sons, like women; And he cannot eat most holy sacrifices, like women. At his birth his mother counts the blood of her impurity like [they do when they give birth to a] girl; And he is disqualified from being a witness, like women. If he had illicit intercourse, he is disqualified from eating terumah, like women.
In what ways is he like both men and women? One who strikes him or curses him is liable, as in the case of men and women; One who unwittingly kills him must go into exile, and if on purpose, then [the slayer] receives the death penalty, as in the case of men and women. His mother must [at his birth] bring an offering, as in the case of men and women. He may eat holy things that are eaten outside of the Temple; And he may inherit any inheritance, as in the case of men and women.
And in what is he different from both men and women? One does not burn terumah if it came into contact with his discharge, Neither is he liable for entering the temple while impure, unlike men or women. He must not be sold as a Hebrew slave, unlike men or women. He cannot be evaluated, unlike men or women. If one says: “I will be a nazirite, if he is neither a man nor a woman,” then he becomes a nazirite. Rabbi Yose says: the hermaphrodite is a unique creature, and the sages could not decide about him. But this is not so with a tumtum (one of doubtful), for sometimes he is a man and sometimes he is a woman."
(Quoted from the Mishnah)
Intersex is nothing new, but it is rarely talked about. It really need to be talked about more.
Many times those gendered as "boys" will reach a stark contrast to their gender upon reaching puberty, and visa versa.
If intersex, is it really gynecomastia?
Actually the Greek word gynecomastia simply means 'female breasts'.