Formally documented de jure discrimination is hardly the only available approach. For example, the term "grandfather clause" stems from Southern states applying severe voter restrictions (poll taxes, literacy tests, etc.) but exempting anyone whose ancestors had the right to vote on a particular pre-Civil War date.
Functionally? Permitted poor/uneducated whites but not blacks to vote without ever mentioning a race in the law.
"No person shall be registered as an elector of this state or be allowed to vote in any election held herein, unless he be able to read and write any section of the Constitution of the state of Oklahoma; but no person who was, on January 1, 1866, or any time prior thereto, entitled to vote under any form of government, or who at that time resided in some foreign nation, and no lineal descendant of such person, shall be denied the right to register and vote because of his inability to so read and write sections of such Constitution."
This one is better: a woman in UAE went to the doctor(gynecologist) and ended up in jail because doctor found out she is pregnant but not married.