Gleaning is the act of collecting leftover crops from farmers' fields after they have been commercially harvested or on fields where it is not economically profitable to harvest. It is a practice described in the Hebrew Bible that became a legally enforced entitlement of the poor in a number of Christian kingdoms.
According to the Book of Deuteronomy and Leviticus, farmers should leave corners of their fields unharvested (pe'ah), should not pick up that which was dropped (gleanings), and should not harvest any over-looked produce that had been forgotten when they harvested the majority of a field. On one of the two occasions that this is stated in Leviticus, it adds that in vineyards, some grapes should be left ungathered, a statement also found in Deuteronomy.
These verses additionally command that olive trees should not be beaten on multiple occasions, and whatever remains from the first set of beatings should be left. According to Leviticus, these things should be left for the poor and for strangers, and Deuteronomy commands that it should be left for widows, strangers, and paternal orphans. The Book of Ruth tells of gleaning by the widow Ruth to provide for herself and her mother-in-law, Naomi, who was also a widow.
In classical rabbinic literature, it was argued that the biblical regulations concerning left-overs only applied to grain fields, orchards, and vineyards, and not to kitchen gardens; the classical rabbinical writers were much stricter in regard to who could receive the remains. It was stated that the farmer was not permitted to benefit from the gleanings, and was not permitted to discriminate among the poor, nor try to frighten them away with dogs or lions; the farmer was not even allowed to help one of the poor to gather the left-overs. However, it was also argued that the law was only applicable in Canaan, although many classical rabbinic writers, who were based in Babylon, applied the laws there too; it was also seen as only applying to Jewish paupers, but poor non-Jews were allowed to benefit for the sake of civil peace.