
387 A.2d 1382 (1978)
Nicholas A. PALMIGIANO
v.
STATE.
No. 77-175-C.A.
Supreme Court of Rhode Island.
July 3, 1978.
*1383 Robert B. Mann, Providence, for appellant.
Julius C. Michaelson, Atty. Gen., Nancy Marks Rahmes, Sp. Asst. Atty. Gen., for appellee.
DORIS, Justice.
This is an appeal from a judgment of the Superior Court denying an application for post-conviction relief.
On June 30, 1970, Nicholas A. Palmigiano was convicted in the Superior Court of murder and robbery. It is uncontroverted that the members of the jury which reached that verdict were not sequestered during the trial. Palmigiano appealed his conviction to this court. We affirmed. State v. Palmigiano, 112 R.I. 348, 309 A.2d 855 (1973).
Palmigiano then filed a petition for a writ of habeas corpus and a motion for a new trial in the Superior Court, alleging that during the trial the jurors had regularly read newspaper accounts of the proceedings reported in the Providence Journal and had discussed both the proceedings and the articles among themselves. This information was obtained through the affidavit of one Costello, who was an alternate juror during Palmigiano's trial. Both the petition and the motion were denied and Palmigiano appealed. We affirmed. State v. Palmigiano, 115 R.I. 166, 341 A.2d 742 (1975).
Following this decision, Palmigiano filed a petition for a writ of habeas corpus in the United States District Court for the District of Rhode Island. The District Court, finding *1384 the record to be unclear as to whether this court had considered the precise questions raised by Palmigiano, denied his petition for failure to exhaust state remedies.
Palmigiano then filed this application for post-conviction relief. His application was denied by a Superior Court justice who found that he had failed to state a claim upon which relief could be granted since his application contained no allegation that the newspaper articles prejudiced him by bringing to the attention of the jurors information which was not presented to them in open court. Palmigiano appeals.
Post-conviction relief in this state is a statutory remedy governed by the provisions of G.L.1956 (1969 Reenactment) §§ 10-9.1-1 to 10-9.1-9. The remedy is available to persons convicted of crimes who claim, inter alia, that the conviction violated their constitutional rights or that newly discovered facts require vacation of the conviction in the interest of justice. Section 10-9.1-1. Palmigiano alleges that the newly discovered fact of the jurors' exposure to newspaper accounts of his trial is evidence that he was denied his constitutional right to a fair trial. This claim is clearly one encompassed by the statute.
The trial justice's decision to deny Palmigiano's application for post-conviction relief rested upon § 10-9.1-6(b), which permits a trial justice to dismiss an application whenever, based upon the record, the application, and the answer, he finds that no genuine issue of material fact exists and the applicant is therefore not entitled to relief as a matter of law. The standard to be used in making this determination is that relied upon by the court in ruling on motions in civil cases brought pursuant to Super.R. Civ.P. 12(b)(6).[1]
The sole function of a 12(b)(6) motion is to challenge the sufficiency of a complaint. Goldstein v. Rhode Island Hosp. Trust Nat'l Bank, 110 R.I. 580, 585, 296 A.2d 112, 115 (1972). It ought not be granted
"unless it appears beyond a reasonable doubt that the plaintiff would not be entitled to any relief no matter what state of facts could be proved in support of his claim. In determining whether there is such a doubt as will warrant the termination of litigation in the pleading stage, we are bound to resolve all doubts in the plaintiff's favor and accept all his allegations as true." Id.

See also Rhode Island Ophthalmological Soc'y v. Cannon, 113 R.I. 16, 317 A.2d 124 (1974); Bragg v. Warwick Shoppers World, 102 R.I. 8, 227 A.2d 582 (1967).
From the record before us, however, it appears that the trial justice, although relying upon § 10-9.1-6(b), went beyond the pleadings in making his decision and took into account both the alternate juror's affidavit and the newspaper articles. We therefore believe that the trial justice reached his decision in actuality pursuant to § 10-9.1-6(c), which closely resembles a decision for summary judgment under Super. R.Civ.P. 56. Section 10-9.1-6(c) permits a trial justice to grant a motion for summary disposition of the application when, based upon the pleadings, discovery, and affidavits introduced, no genuine issue of material fact exists and the moving party is entitled to judgment as a matter of law.
The Rules of Civil Procedure permit 12(b)(6) motions to be treated as motions for summary judgment in the court's discretion when matters outside the pleadings are presented to the court. Super.R.Civ.P. 12(b)-(c). See Menzies v. Sigma Pi Alumni Ass'n of Rhode Island, Inc., 110 R.I. 488, 294 A.2d 193 (1972); DiBello v. St. Jean, 106 R.I. 704, 262 A.2d 824 (1970). In view of the fact that the trial justice relied upon matters outside the pleadings, we shall *1385 treat the state's motion as though it were a motion for summary disposition, cf. Ewing v. Frank, 103 R.I. 96, 234 A.2d 840 (1967), and review this case as if the trial justice had granted the motion under § 10-9.1-6(c).[2]
The standards for granting a § 10-9.1-6(c) motion are identical to those utilized in passing on a summary judgment motion. As he does in considering motions for summary judgment, the trial justice must consider the affidavits and pleadings on a motion for summary disposition in the light most favorable to the party against whom the motion is made. Cf. Kirby, Inc. v. Weiler, 108 R.I. 423, 276 A.2d 285 (1971). Based upon the affidavits and pleadings, the trial justice must decide whether or not a genuine issue of material fact exists. If not, the moving party is entitled to summary disposition if otherwise entitled as a matter of law. Cf. Givens v. Union Inv. Corp., 116 R.I. 539, 359 A.2d 40 (1976); Kirby, Inc. v. Weiler, supra; Marandola v. Hillcrest Bldrs., Inc., 102 R.I. 46, 227 A.2d 785 (1967).
On appeal, we must review the decision of the trial justice to determine whether, in making such a finding, the trial justice considered the affidavits and pleadings in the light most favorable to the opposing party. We will uphold the trial justice's decision only if the record shows that no genuine issue of material fact exists and the state is entitled to summary disposition as a matter of law. Givens v. Union Inv. Corp.; Marandola v. Hillcrest Bldrs., Inc., both supra.
The law is well settled in this state that the use of affidavits of jurors themselves, or of others, concerning what the jurors may have done either before or during their deliberations is impermissible to impeach the jury verdict. State v. Palmigiano, 115 R.I. 166, 168, 341 A.2d 742, 743 (1975). One exception to this rule, however, occurs when such affidavits are admitted for the sole purpose of demonstrating that matters not in evidence reached the jury through outside communications or media contacts. Id. This exception is also recognized by the federal courts, which permit juror testimony on facts bearing on the question of the existence of any extraneous influence upon the jury, while prohibiting testimony on how that influence operated upon a juror's mind. See Mattox v. United States, 146 U.S. 140, 13 S.Ct. 50, 36 L.Ed. 917 (1892). United States v. Wilson, 175 U.S.App.D.C. 173, 534 F.2d 375 (1976); United States v. Green, 523 F.2d 229 (2d Cir. 1975); Government of Virgin Islands v. Gereau, 523 F.2d 140 (3d Cir. 1975), cert. denied, 424 U.S. 917, 96 S.Ct. 1119, 47 L.Ed.2d 323 (1976); United States v. Howard, 506 F.2d 865 (5th Cir. 1975); United States v. Thomas, 463 F.2d 1061 (7th Cir. 1972).
The affidavit of alternate juror Costello is admissible, therefore, for the limited purpose of establishing that newspaper articles relating to the trial reached the jury during the proceedings. It is not enough, however, for an applicant to submit an affidavit alleging that members of the jury received media contacts during the course of the trial. In addition, some showing must be made on the record that the applicant was prejudiced thereby.
"Newspaper and television publicity surrounding a trial represent the most common threats to the integrity of the proceedings. This is not to suggest, however, that juror exposure to any publicity vitiates the fairness of the trial. The severity of the threat depends upon both the nature of the information so publicized and the degree of juror exposure to it." United States v. Thomas, supra at 1063. Unless the nature of the information *1386 was prejudicial to the applicant, he is not denied his right to a fair trial. United States v. Eagle, 539 F.2d 1166 (8th Cir. 1976), cert. denied, 429 U.S. 1110, 97 S.Ct. 1146, 51 L.Ed.2d 563-64 (1977); Government of Virgin Islands v. Gereau, supra; State v. Halko, 56 Del. 480, 193 A.2d 817 (Super.Ct.1963), aff'd, 58 Del. 47, 204 A.2d 628 (1964); People v. Hurley, 10 Ill.App.3d 74, 293 N.E.2d 341 (1973); Harris v. State, 249 Ind. 681, 231 N.E.2d 800 (1967); Roy v. State, 213 Kan. 30, 514 P.2d 832 (1973); State v. Bazinet, 372 A.2d 1036 (Me.1977); Hannah v. State, 336 So.2d 1317 (Miss.1976), cert. denied, 429 U.S. 1101, 97 S.Ct. 1125, 51 L.Ed.2d 551 (1977); State v. Bautista, 193 Neb. 476, 227 N.W.2d 835 (1975).
In cases where substantial prejudicial publicity has been found to have reached the jury during trial, the publicity has generally involved "`information about the defendant that would not be admissible before the jury or that was not in fact put before the jury in court.'" United States v. Jones, 542 F.2d 186, 195 (4th Cir. 1976), quoting United States v. Hyde, 448 F.2d 815, 849 (5th Cir. 1971), cert. denied, 404 U.S. 1058, 92 S.Ct. 736, 30 L.Ed.2d 745 (1972). See also State v. Holmes, 110 Ariz. 494, 520 P.2d 1118 (1974); Quintana v. People, 158 Colo. 189, 405 P.2d 740 (1965). When we examine the record before us in light of this standard, it is evident to us that the decision of the trial justice was correct.
We have reviewed the newspape articles contain no testimony which was unavailable to the jury nor do they include any prejudicial comments. Therefore, as Palmigiano's application for post-conviction relief could not be granted without a showing of prejudice, and the record, viewed in light most favorable to Pal migiano, disclosed no possibility of prejudice, the justice was quite correct in granting a motion for summary disposition on behalf of the state.
Palmigiano's additional argument that it was the responsibility of the trial justice sua sponte to sequester the jury is without merit. Margoles v. United States, 407 F.2d 727, 732-33 (7th Cir. 1969), cert. denied, 396 U.S. 833, 90 S.Ct. 89, 24 L.Ed.2d 84 (1969).
Palmigiano's appeal is denied and dismissed and the judgment appealed from is affirmed.
NOTES
[1]  The Rules of Civil Procedure are applicable to proceedings held on applications for post-conviction relief. G.L.1956 (1969 Reenactment) § 10-9.1-7. Palmigiano v. Mullen, R.I., 377 A.2d 242 (1977).
[2]  The trial justice, in treating a 12(b)(6) motion as a motion for summary judgment, must give all parties a reasonable opportunity to present all pertinent materials prior to rendering a decision. Super.R.Civ.P. 12(b)-(c). The record clearly indicates, however, that the trial justice offered to give Palmigiano's counsel an opportunity to respond to the dismissal. Palmigiano's counsel declined the offer, indicating that he had set forth everything he cared to in the pleadings and memoranda of law.
