Opinion of the court by
Affirming.
The Chesapeake & Ohio Railroad maintains, owns, and operates a railroad formerly known as the Kentucky & South Atlantic Railroad, which runs through the lands of the appellants, in Menifee county. The appellants having given notice to the appellee to fence the right of way through its lands, and it having failed to do it, this action was instituted to compel it to do so or pay the expense thereof. In 1876 Solomon Ringo was the owner of the land, and donated the right of way through it to the Kentucky & South Atlantic Railroad. This action is based on section 1797, Kentucky Statutes, "which reads as follows: “That when the owner of any land or lands, or any immediate or remote grantor or vendor of such owner, has given to the corporation or person owning or controlling and operating any railroad a right of way through such land or lands free of charge, then the entire fencing on the division lines between such lands and the right of way of such railroad shall be done by and at the cost of the corporation or person owning or controlling and operating *681such railroad, said fencing to be done as required by this act.” As the right of way was donated before the enactment of the statute of which section 1797 is a part, it is insisted by counsel for appellee that the section can not be so construed as to impose an obligation upon the appellee to fence the right of way.' This section is substantially of the same import as section twelve of the act of 1886, which was construed in Railroad Co. v. Todd, 91 Ky., 175 (12 R. 726) (15 S. W., 56, 11 L. E. A., 285). In that case it appeared that the donation was made long before the passage of the act. It was sought in that case to compel the railroad to fence its right of way at its own expense. The court held that the statute was unconstitutional.
This court had under consideration section 1797 in the case of Slead v. Railway Co., 109 Ky., 214; 22 R., 713 (58 S. W., 581), and held that it was valid in so far as it imposed the duty upon the railroad companies to fence their rights of way which had been donated after the enactment of the law containing the section; but in that case it was also held that it was not enforceable against a railroad where the right of way was given prior to the enactment of the statute. From the opinions of this court referred to, the appellants can not compel the appellee to fence the entire right of way at its own expense. Therefore the court properly sustained a demurrer to the petition as amended. The judgment is affirmed.