Dissenting Opinion by
Hoffman, J.:In this appeal, we must determine whether the trial court erred in granting appellee’s motion for judgment on the pleadings pursuant to Rule 1034 of the Pennsylvania Rules of Civil Procedure.
Appellants operate a general store and gasoline service station in Unionville, Chester County. On May 1,1970, the parties entered into an “Equipment Loan Agreement” under which appellee agreed to lend appellants four gasoline curb pumps and underground tanks. In return, ap*508pellants agreed to use the equipment exclusively for the handling, storage, and dispensing of appellee’s products. On three separate occasions, gasoline explosions occurred on appellants’ property, causing extensive damage. As a result, appellants instituted a suit in trespass, alleging that the explosions were caused by appellee’s negligent construction and installation of the fuel storage tanks.
On December 1, 1972, appellee filed an answer to appellants’ complaint, and attached new matter pursuant to Rule 1045: “The said written contract... is attached hereto ... and under the terms of paragraph five of said agreement, the plaintiff,... does agree to indemnify and save harmless defendant from any liability for any loss, damage or injury in any way caused by the equipment system leased and waives and releases said defendant from any claim for damages...” In their reply to new matter, appellants averred that no answer was required. On April 25, 1973, appellee filed an amended answer and amended new matter, again referring to the indemnity clause. In reply to the amended new matter, appellants stated: “... The plaintiffs are advised, believe and therefore aver that the said [indemnity clause] was not in force at the time of the times relevant to this cause of action, was not legally binding in the premises, was contrary to law and 'public policy, and was otherwise legally inoperative.” (Emphasis added).
Appellee filed a motion for judgment on the pleadings pursuant to Rule 1034 on September 19, 1973. After oral argument, and after denying appellants’ request for leave to amend their complaint to include Pennsylvania statutes and regulations concerning the installation of fuel tanks, the lower court granted appellee’s motion. This appeal followed.
It is well-settled that a motion for judgment on the pleadings can only be granted in cases where the moving party’s right to prevail is so clear that a trial would be a fruitless exercise. Karns v. Tony Vitale Fireworks *509Corp., 436 Pa. 181, 259 A. 2d 687 (1969); Bata v. Central-Penn National Bank of Philadelphia, 423 Pa. 373, 224 A.2d 174 (1966); Bureau for Child Care v. The United Fund of the Philadelphia Area, 416 Pa. 617, 207 A. 2d 847 (1965). Furthermore, when passing on a motion under Rule 1034, the trial court can consider only the pleadings themselves and any documents properly attached thereto. Hammermill Paper Co. v. Rust Engineering Co., 430 Pa. 365, 243 A. 2d 389 (1968); Aughenbaugh v. North American Refractories Co., 426 Pa. 211, 231 A. 2d 173 (1967).
A motion for judgment on the pleadings is in the nature of a demurrer, and thus all of the opposing party’s well-pleaded allegations are assumed to be true, and only specifically admitted facts may be used against him. See e.g., Goldman v. McShain, 432 Pa. 61, 68, 247 A. 2d 455 (1968). In the present case, appellee’s new matter averred that the contract contained an indemnity clause, which, if valid, would be a complete defense to appellants’ suit. The existence of the indemnity clause is obviously a factual averment requiring a response: “ ‘New matter’ pleading is designed to compel a plaintiff to answer the defendant’s affirmative defenses during the pleading stage to avoid an unnecessary trial. If the plaintiff answers inadequately, a motion for judgment on the pleadings may be filed.” Chivers v. School District of Mt. Lebanon, 6 Commonwealth Ct. 622, 625, 297 A. 2d 187, 189 (1972), quoting Goodrich-Amram, Standard Pennsylvania Practice (1972 Supplement), §1030-1 at 308. Thus, had appellants failed to reply to appellee’s new matter, the lower court’s ruling would have been proper because a lawful indemnity clause would be a complete defense and the pleadings would not have indicated any dispute as to its validity. But appellants specifically denied that the indemnity clause was controlling. At this juncture, therefore, it cannot be said that appellants have failed to state a claim upon which relief can be granted: “... a defend*510ant may not rely on his affirmative defense to sustain a motion for judgment on the pleadings, unless of course plaintiff has failed to deny the allegation in defendant’s new matter which raises that defense. In the present case, however, appellants’ reply to appellees’ new matter specifically denies that the statute of frauds controls. Moreover to say that a possible affirmative defense exists to a complaint is not to say that such a complaint is legally insufficient on its face. It may still state a claim upon which relief can be granted, even though the relief itself will eventually be denied should defendant prove his affirmative defense. Surely, for example, we would not hold that a complaint in trespass failed to state a claim upon which relief could be granted simply because the defendant’s new matter raised the defense of contributory negligence. To prevail, defendant would still have to prove that defense at trial or somehow succeed in having plaintiff admit it in his own pleadings.” Goldman v. McShain, supra, at 73-74, 247 A.2d at 461. See also Enoch v. Food Fair Stores, Inc., 232 Pa. Superior Ct. 1, 331 A. 2d 912 (1974). In the present case, the pleadings indicated that appellants disputed the validity of the indemnity clause. It is difficult to see how the court concluded that appellants failed to state a claim upon which they could possibly prevail at trial. Thus, the lower court erred in granting appellee’s motion.
The Majority also approves the lower court’s ruling that the indemnity clause is valid because appellants failed to show that the clause was void as against public policy. Apparently, the Majority would require appellants to point “to legislative pronouncements on the subject of the instant installation and maintenance.” The Majority, however, fails to cite any decision or any rationale which would require a litigant to plead specific authority in support of a legal proposition. Both the lower court and the Majority are apparently confusing a motion for judgment on the pleadings under Rule 1034 with a motion for sum*511mary judgment under Rule 1035.1 In the latter situation, the trial judge can consider affidavits, memoranda of law, etc., in making his determination. In passing on a motion for judgment on the pleadings, however, the court can consider only the pleadings. See Hammermill Paper Co. v. Rust Engineering Co., supra.
Moreover, if the trial judge and the Majority believe that it was necessary for appellants to plead specific examples of legislative concern with the subject matter at issue, the trial court clearly abused its discretion in not granting appellants’ request for leave to amend. “Inasmuch as a judgment on the pleadings denies a party the right to fully develop his theories and averments at trial, a motion to that effect should be denied if a proper and seasonable amendment will cure pleading defects.” Bata v. Central-Penn National Bank of Philadelphia, supra, at 384-385, 224 A.2d at 182. (Emphasis added.) Appellee would not have suffered any prejudice had the trial judge granted appellants’ request. The Majority, however, states that “[w]e believe that the hearing judge did not abuse his discretion in this refusal, as the issues might more properly have been raised in answer to appellee’s motion or at argument.” As stated previously, only the pleadings can be considered in a motion under Rule 1034. An “answer” to a motion for judgment on the pleadings is obviously not a pleading — the Majority fails to explain why such a document is required if the court is prohibited from considering it. The fact that the lower court held an oral argument is completely irrelevant to the issue of whether appellants should have been granted leave to amend. The court knew that appellants’ theory was that the indemnity clause was void as against public policy. It is unfair to hold that the indemnity clause is valid *512because no public policy has been shown, while at the same time denying appellants’ the right to amend their pleadings.
Thus, I believe that judgment on the pleadings was erroneously granted. If this were a proper case for judgment on the pleadings, the trial court erred in passing on the motion without granting appellant leave to amend. I would reverse the order of the lower court.
Cercone and Spaeth, JJ., join in this dissenting opinion.
. In fact, the lower court concluded its opinion by stating: “For these reasons summary judgment was entered.” (Emphasis added.)