Uktzin, Chapter 2, Mishnah 9. This mishnah deals with produce that is growing in a flower pot, a planter, and with the question of whether such produce is susceptible to the laws of tumah at all.
Two Kinds of Flower Pot
Earlier masechtos have already introduced us to one of the fundamental distinctions in hilchos tumah, which turns on whether a planter has a hole pierced in its bottom. Where such a hole exists, the vessel is called an atzitz nakuv, and halachah views it as continuous with the soil below it. Plants growing inside it therefore have the standing of mechubar lakarka, and produce still rooted in the ground is beyond the reach of tumah entirely: it is not mekabel tumah.
An atzitz she'eino nakuv, a pot with no holes at all, is a different story. Nothing links it to the earth beneath it, so it is regarded as talush, detached, and produce growing in it can indeed become tamei.
The Case of the Mishnah
The Mishnah presents this situation: "Kishus sheneta'o be'atzitz", a cucumber that a person planted in a flower pot. The pot in question is an atzitz she'eino nakuv, with no holes whatsoever, so by rights the cucumber growing in it should have the halachic standing of detached, uprooted produce, fully able to receive tumah.
Then comes the twist. "Veyatza chutz la'atzitz": as the plant developed it stretched outward and passed the wall of the planter, with a portion of it now hanging in the air over the soil. Regarding that outer portion, there is no question that its status is that of something attached to the ground.
The Tanna Kamma answers in a single syllable: "Tahor". And how far that one word extends is striking. The immunity from tumah does not stop at the piece hanging outside. That overhanging piece serves as a link to the earth, and by way of it the whole cucumber, the segment resting inside the sealed planter included, acquires the standing of attached produce, which no tumah can touch.
Rebbi Shimon Objects
Rebbi Shimon does not accept this. "Omer Rebbi Shimon: mah tivah letaher?" By what power should this growth outside the pot purify what was already tamei inside the pot? A connection to the ground can prevent tumah from taking hold; it cannot reach backward and strip away a tumah that has already settled in.
His conclusion, then, is: "Ella hatamei betumaso vehatahor ye'achel": whatever became tamei stays tamei, and whatever is tahor is permitted for eating. Practically speaking, the sides of the planter serve as the dividing line for the vegetable. The part enclosed inside them retains its tumah, while the part that pushed out past them is tahor and may be eaten with no hesitation.
So a single vegetable can carry two statuses at once, and the line between them is drawn precisely at the rim of the planter in which it grew.