There were two interpretations of the rules of divorce, maintained by the two main groups of Muslims. One followed the ruling Umayyad or Abbasid class, and the other followed the descendants of the Holy Prophet (s).
According to the first group, when a man declares, ‘I divorce you’, three times in one go, the two are separated and cannot remarry until the woman marries another man and is divorced or widowed.
The Shi’ah maintain that the three words, ‘I divorce you’ can be repeated 100 times in one go and still be considered one divorce. Husband and wife can reunite within a specified term if they wish to. If this incident is repeated, they can still reunite within the specified term. However, if it is repeated a third time they lose their chance of reconciliation. The woman must marry another man, fulfill the duties of a wife, then, if divorced or widowed, can marry him again.
In Kufa there lived a couple, happily married. They quarreled on a minor issue and the man declared ‘I divorce you’ thrice. Both were extremely unhappy after the incident and repented over their act. Those people that believed in the first interpretation insisted upon their separation. The Shi’ah scholars pacified them and allowed reconciliation. But the wife was afraid that if they united, their future offspring might be declared illegitimate. She insisted upon her husband to get a ruling from Imam Jafar al-Sadiq (‘a) himself.
The Abbasid ruler had forcefully brought the Imam (‘a) from Medina and isolated him in a house in Heerah, a town near Kufa. He was kept under strict surveillance. Nobody was allowed to meet him.
This man disguised himself as a greengrocer and crying, ‘Cucumbers, cool, tasty cucumbers,’ managed to gain entrance into the house. He then greeted the Imam (‘a) and quickly acquainted him with his problem. The Imam(‘a) admired his disguise and after learning the reason declared, ‘Go back to your wife, for she is legally yours till you don’t commit this mistake three times.’
Reference : Anecdotes of The Ahlul Bayt (Daastaan e Raastaan ) by Ayatullah Murtadha Mutahhari