A pious man owned a vineyard, and the hedge around it had fallen into disrepair. Gaps had opened in the fence, leaving the vines exposed to animals and thieves. The vineyard needed mending badly, and the man knew exactly what needed to be done.
The problem was when the thought occurred to him. It was Shabbat — the day of rest, when no work of any kind is permitted. And the thought that entered his mind was not a passing observation. It was a plan. He found himself mentally mapping out the repairs: where to place the new stakes, how to weave the branches, which sections needed the most urgent attention.
The man caught himself. Planning work on Shabbat, the Rabbis taught, violated the spirit of the day even if no physical labor was performed. The Sabbath was meant to be a sanctuary in time, free not only from work but from the very thought of work. By mentally planning his repairs, he was desecrating the rest that God had commanded.
So he made a decision that would have baffled any practical farmer: he resolved never to mend the hedge at all. The thought of repairing it had come to him on Shabbat, and he refused to benefit from a plan conceived on the holy day. He would let the vineyard stand open rather than profit from a Sabbath violation, even one that existed only in his mind.
Heaven rewarded him. In the gap where the hedge had fallen, a rare and valuable tree took root and grew — a species so uncommon that its worth exceeded anything the vineyard had ever produced. The man who sacrificed his fence for the honor of Shabbat received in its place a treasure that no fence could contain.