Avodah Zarah 63 - Learning Shemittah Laws from Harlot's Payment

The prohibition of libation wine is extended to payments received for working with it. In a related incident, the members of the household of Rabbi Yannai borrowed shemittah produce from the poor and repaid them with ordinary produce in the eighth year. They did this to benefit the poor, for it allowed the poor to trade their soon-to-be-unusable shemittah produce and receive usable eighth-year produce in return - since the original produce was no longer extant when the loan was repaid. Thus, unlike the wine case, the connection between produce and payment was broken.

They asked Rabbi Yochanan is this was done correctly, and he proved that it was, from the laws of a harlot's payment. The rule is that if one gave the harlot an animal in payment and afterward cohabited with her, or if he cohabited with her, and afterward gave her an animal in payment, her payment is permitted, and she can bring it on the Altar. Why? Because at the time she acquires the animal, the cohabitation is no longer extant - and the case of shemittah produce is the same.

Art: Camille Pissarro - Peasant Woman with a Goat