
142 A.2d 540 (1958)
Oscar ELMASIAN et ux.
v.
Frederick A. DALEY et al.
Ex. No. 9889.
Supreme Court of Rhode Island.
June 10, 1958.
*541 Aram K. Berberian, Providence, for plaintiffs.
Herbert Katz, Pawtucket, for defendants.
POWERS, Justice.
This is an action in assumpsit for use and occupation. The case was submitted on the pleadings without oral argument to a justice of the superior court who overruled the plaintiffs' demurrer and sustained the defendants' plea in abatement. The case is before us on the plaintiffs' bill of exceptions to the sustaining of the defendants' plea in abatement.
The plaintiffs issued their writ in assumpsit for use and occupation to which defendants filed a plea in abatement alleging that the same cause between the same parties was pending in the superior court on an appeal by defendants from the sixth judicial district court to a judgment entered therein for plaintiffs and which appeal plaintiffs had not discontinued in the form provided by law.
In their plea defendants "pray judgment of the said cause of action numbered 141607, this Honorable Court having judicial notice of its own records, and further pray that said writ of attachment commencing the present cause of action and declaration therein be quashed." The plaintiffs demurred to defendants' plea on the ground that it "does not set forth in what way and in what manner the form was improper, all in violation of the rules of pleading in pleas in abatement." The trial justice overruled plaintiffs' demurrer stating: "The fact of the pendency is sufficient without mention of the fact that plaintiffs attempted to discontinue the earlier action but failed to comply with the provisions of Section 2 of Chapter 523 of the General Laws of Rhode Island, 1938," and he sustained defendants' plea in abatement.
The plaintiffs do not attack the overruling of their demurrer but contend that the trial justice erred in sustaining defendants' plea in abatement without giving them the opportunity to be heard on the facts and the law alleged in defendants' *542 plea. They argue that the office of the demurrer is to test the sufficiency of the plea and does not admit the truth of the facts or the law well pleaded as was the case at common law. We are not disposed to agree that in a civil case, where the plea in abatement constitutes a plea in bar and the facts alleged therein are susceptible to judicial notice as is the situation in the present case, the overruling of the demurrer did not result in quashing the plaintiffs' writ.
It is a well-settled principle that the pendency of a prior action for the same cause and between the same parties within the same jurisdiction may be asserted as a ground for the abatement of the second action. 1 Am. Jur., Abatement and Revival, § 14, p. 27. Shelby v. Bacon, 51 U.S. 56, 13 L.Ed. 326.
The plaintiffs contend that the sole question before the trial justice was whether or not their demurrer successfully attacked defendants' plea in abatement, and that the court erred in sustaining defendants' plea by following the common-law principle that a demurrer admits as true in law all of the facts well pleaded. They argue that the original office of the demurrer has long since ceased to be recognized by the courts.
We are well aware that by legislation, judicial determination and custom, the rule has been greatly relaxed so that generally speaking a demurrer no longer joins issue. The impelling reason for its modern status is to be found in the fundamental function of our judicial system, namely, to do justice between the parties. In its original conception the demurrer commonly denied a litigant his day in court on the merits of the controversy merely by reason of his defective pleading. The harshness of the rule as universally applied came to be considered as repugnant to a sense of justice and the rigor of the law was considerably relaxed.
We do not agree that in proper circumstances it is error for a trial justice to invoke the common-law doctrine of a demurrer. It seems to us that in the instant case the circumstances were proper. The plaintiffs' demurrer attacked the validity of the allegation in defendants' plea, although if true the plea constituted a plea in bar, since it invoked the well-established principle of a prior action pending in the same court between the same parties and for the same cause of action. 1 Am.Jur., Abatement and Revival, § 14, p. 27; 41 Am.Jur., Pleading, § 124, p. 375. Chapple v. National Hardwood Co., 234 Mich. 296, 207 N.W. 888, 44 A.L.T. 804, 44 A.L.R. 804. And see Dukehart v. Fales, 49 R.I. 407, 143 A. 615.
The defendants cite Hill v. Trapp, 206 Ipp.App. 272, which reaffirms 1 Chitty on Pleading (14th Am. ed.), *466, and an earlier Illinois case, Cushman v. Savage, 20 Ill. 330, all to the effect that after the overruling of a demurrer to a plea in abatement it is not regular to permit a plaintiff to plead over. We have found no authority since the decision in Hill v. Trapp, supra, which has rejected this principle.
In the instant case the plaintiffs were not prejudiced by the trial justice's sustaining of defendants' plea in abatement since their case against these defendants is still pending in the superior court on defendants' appeal from the decision of the sixth judicial district court.
The plaintiffs' exception is overruled, and the case is remitted to the superior court for further proceedings.
