511. Source of right to compensation.

At common law an agricultural tenant is not entitled to compensation1 from his landlord for improvements or acts of husbandry of which the landlord obtains the benefit when the tenant quits the holding2. This rule may be modified by the custom of the country3, and the parties may themselves provide for compensation in their agreement. The right to compensation is, however, now almost wholly regulated by statute to the exclusion of both custom and agreement, though a written agreement may entitle a claimant to compensation where he has no right to it under statute