Elijah was traveling in disguise with a rabbi, as he often did in the legends. Toward evening they arrived at a large and imposing mansion, the home of a haughty, wealthy man.

The welcome was cold. A piece of bread and a cup of water were placed before them. The master of the house said nothing. He did not bow, he did not speak, he did not bid them rest. The two travelers were left alone in a corner of the great hall. They slept there without a word exchanged.

In the morning, as they prepared to leave, Elijah looked around the mansion. One of its walls needed repair — a long crack had opened. Elijah stopped, sent for a carpenter, and — to the astonishment of the rabbi — paid for the full repair of the wall out of his own pocket. A return, he said blandly, for the hospitality they had received.

The rabbi was stunned. Why reward this man for his cold welcome? Why reward him at all?

Elijah explained only later. That wall, he said, had been hiding a treasure. If it had fallen, the stingy master of the house would have discovered it and become even richer and haughtier. By sealing the wall, Elijah sealed the treasure. The man would never find it now. His reward for small hospitality was a small reward — exactly equal to what he had given.

The midrash closes its teaching with a line that stings: heaven measures your gift and pays in kind. A loaf and a cup will buy you a carpenter. A feast and a blessing, perhaps, would have bought you a fortune.