Matsya Purana — Ila–Sudyumna Episode and the Expansion of the Ikṣvāku
समयः शम्भुदयिताकृतः शरवणे पुरा यः पुमान्प्रविशेद् अत्र स नारीत्वमवाप्स्यति //
samayaḥ śambhudayitākṛtaḥ śaravaṇe purā yaḥ pumānpraviśed atra sa nārītvamavāpsyati //
This is the ancient ordinance established in the Śaravana grove by Śambhu’s beloved: any man who enters here shall attain womanhood.
It does not address Pralaya; it highlights a localized sacred ordinance (samaya) where a holy site produces an extraordinary transformation as a sign of divine power.
Indirectly, it warns householders and rulers to approach sacred places with restraint and awareness of vows and prohibitions (niyamas), since tirthas are portrayed as potent and rule-governed.
The focus is ritual/topographical rather than architectural: the Śaravana grove is treated as a charged sacred zone where entry itself functions like a rite with a definite, extraordinary फल (result).