
    The Illinois Central Railroad Company v. Thomas McKee.
    1. Pleading—variance between allegations and proofs. Where, in an action against a railroad company for the killing of a horse, the declaration simply averred it to be the duty of the company to erect, maintain and keep in repair the fences on its roadway, and, that, by means of neglect in keeping them in repair, the horse had strayed upon the track and was killed,—held, that testimony showing that the horse strayed upon the track through a gate at a farm crossing, which had been left open, was inadmissible, as the declaration contained no averment, that the gate was not kept closed. A plaintiff can only prove what he alleges.
    2. Neglect in maintaining and keeping in repair a fence, whereby a person is injured in his property, is a ground of action totally distinct from that of carelessness in leaving open a gate on the line of the fence; and, when an action is predicated upon the latter ground, it must he so averred in the declaration.
    3. Same — deela/ration must state material facts. The declaration, in every case, must contain a full and explicit statement of all the material facts upon which a recovery is sought, that the defendant may he prepared to meet them.
    4. Instructions—u/pon matter inadmissible in evidence. It is error for the court to instruct the jury upon matters inadmissible in evidence under the pleadings, but which, in fact, were admitted in proof.
    5. Eailroad companies—Mobility for negligently leaving open gate —- and when not Viable. A railroad company is not required to keep a patrol on the line of its road to see that the gates at farm crossings are kept closed; but, if its employees, seeing such a gate open, do not close it, when not opened by a person to whom an injury afterward results, the company is liable for such injury. If, however, the gate is opened by the person injured, and by his neglect left open, no action will lie for an injury resulting to him, by reason of such act and neglect.
    Appeal from the Circuit Court of Coles county; the Hon. A. L. Davis, Judge, presiding.
    The opinion states the cáse.
    Mr. O. B. Ficklin and Mr. A. J. Gallagher, for the appellant.
    Messrs. Henry, Read & Steele, for the appellee.
   Mr. Justice Breese

delivered the opinion of the Court:

This was an action on the case in the Coles Circuit Court, brought by Thomas McKee against The Illinois Central Railroad Company, for killing a horse, the property of the plaintiff, by the defendant’s locomotive, the horse having got upon the track by means of a gate at a farm crossing being negligently left open, as alleged.

The court gave to the jury this instruction for the plaintiff:

If the jury believe, from the evidence, that the horse of the plaintiff got upon the defendant’s railroad at a gate erected at a farm crossing by the defendant, and that while so on said road was killed by the locomotive and train of the defendant, and such gate through which said horse entered, at the time and for a long time previously thereto was left open continuously, or so large a portion of the time that the employees of the road whose duty it was to keep up and maintain the fence must have known the fact, that at the time the gate was not left open without the fault or negligence of the defendant, and that the place where said horse got upon said road was not within the limits of any city, town or village, nor at the crossing of any public highway, and was within five miles of a settlement and at a place where the proprietors of adjoining lands to the defendant’s right of way had not fenced nor agreed to fence, and that said road had been open and the defendant had run upon it locomotives and trains more than six months previous to the killing of said horse, then the jury will find for the plaintiff and assess his damages at the value of said horse.”

The defendant asked these instructions, which were refused:

When the railroad makes and maintains a gate at a farm crossing for the accommodation of the owner of a farm, the duty devolves on the owner or proprietor of the farm, and not on the railroad company, to keep the gate closed, and if the death of the horse in controversy was occasioned by the negligence of such proprietor, the company is not liable.
“ As there is no allegation in the declaration that defendant had failed or neglected to keep the gates closed at the farm crossing, near where the horse was killed, all evidence touching that question is excluded from the jury.”

The only questions made here arise out of these instructions, and involve the point, whose duty is it to see that gates so placed at farm crossings are kept closed, and upon the admission of certain testimony.

There was no count in the declarationthat this gate, at this farm crossing, was not kept closed,—the only averments are as to the duty of the company to erect, maintain and keep in repair the fences on their roadway, and that, by reason of neglect in keeping them in repair, the horse strayed upon the track and was killed.

When proof was offered by the plaintiff that the gate was left open, the defendant objected, on the ground of the want of such an allegation in the declaration.

Was the testimony on this point properly admitted? We think not. The plaintiff in every case must state the facts in his declaration so plainly that the defendant may meet them. Neglect in maintaining and keeping in repair a fence, in general terms, is one ground of action,— that a gate on the line of the fence was carelessly left open is another. A fence, of which a gate is part, may he in perfect repair, and therefore the allegation that a gate was left open is necessary to give notice to the defendant of what he is to defend against. There being no allegation of negligence in this respect, the testimony should not have been received. And this is in accordance with the familiar principle that a plaintiff can only be permitted to prove what he alleges. The gravamen of the action was, neglecting to keep the fence in repair, and it is not maintained by proof that a gate was carelessly left open. Gates are made to be opened, and opening them, and carelessly leaving them so, is a good cause of action, entirely different from that of neglecting the duty of erecting and keeping in repair the fence, and of which a defendant should be apprised by the pleading. A fence is not out of repair, nor can it be so alleged, merely because the gate is carelessly left open. The plaintiff should have stated his case according to the facts he intended to prove. On this point we are with the appellants.

We would have no difficulty about the instructions, had the declaration been in proper shape. As it is, there being no allegation in the declaration embracing this matter, any instruction in relation to it was out of place. On the abstract question presented, it is as much the duty of the owner of the farm at the crossing to keep the gate closed as it is that of the company, for, as this court said in the case of the Illinois Central R. R. Co. v. Dickerson, 21 Ill. 55, it is not the duty of the company to keep a patrol the whole length of their road to see

that the fence is not broken down by breachy cattle, by men, or by a whirlwind, and by the same reasoning it would follow they are not obliged to patrol the line of their road to see if the gates at farm crossings are left open. Still they are liable, if their employees, seeing such a gate open, neglect to close it, and an injury results, unless the same be left open by the carelessness of the farmer. If the gate is left open by the owner of the land, the company would not be responsible, if by the company’s agents it would be, and a neglect to shut it when it should be closed, by the agents or employees of the company, would be negligence for which the company would be liable.

The evidence, therefore, offered on this point, and admitted by the court, should have been rejected, there being no allegation in the declaration to which it was applicable.

The judgment of the Circuit Court is reversed, and the cause remanded with leave to plaintiff to amend his declaration.

Judgment reversed.  