
292 A.2d 235 (1972)
Henry PALAZZO et ux. 
v.
The BIG G SUPERMARKETS, INC. 
No.  1516-Appeal. 
Supreme Court of Rhode Island. 
June 19, 1972. 
Paul J. DiMaio, Robert J. DeCesaris, for plaintiffs. 
Higgins & Slattery, Eugene V. Higgins, for defendant. 
PAOLINO, J.
This matter is before this court on the plaintiffs' appeal from an order entered in the Superior Court granting the defendant's motion to dismiss.  We reverse. 
The pertinent facts follow.  In December, 1970, plaintiffs commenced this civil action for personal injuries allegedly sustained by plaintiff Lida Palazzo while she was an invitee on defendant's premises and allegedly caused by the negligence of defendant in failing to provide a safe condition on those premises.  The husband seeks consequential damages.  The complaint expressly alleges that the incident occurred on September 12, 1968.  The defendant did *236 not file an answer to the complaint.  Instead it filed a Super.  R. Civ. P. 12(b) (6)[1] motion to dismiss on the ground that the complaint fails to state a claim upon which relief can be granted, "* * * as the right of action set forth in the Complaint did not accrue within two (2) years next before the commencement of this action as appears by the record." 
The motion was heard before a justice of the Superior Court.  The plaintiffs admit that this action was commenced after the expiration of the statute of limitation, but, as appears from the transcript, plaintiffs claimed that their failrue to bring the action within the statutory period "* * * was because of the representation of the claims adjuster for the insurance company * * *."  The plaintiff, Lida Palazzo, filed an affidavit setting forth her negotiations with the adjuster and alleging that "During the period of negotiation he advised me not to see an Attorney and that a settlement will be reached in the near future."  The adjuster also failed an affidavit describing his relations with plaintiffs.  He alleged that he offered $2,200 in settlement but that they demanded $10,000, which he told them was excessive.  He denied that he had advised her concerning the possiblity of her retaining an attorney or that he ever assured plaintiffs that a settlement of this action would be made by his company.  The trial justice accepted these affidavits and also deemed it advisable to take further testimony. 
At the evidentiary hearing on the motion to dismiss, plaintiffs and their son Angelo testified in support of plaintiffs' claim that their failure to bring the action within the statutory period was due to the adjuster's representations and that therefore defendant was estopped from using the statute of limitations as a defense.  The defendant, in turn, presented the testimony of the adjuster.  He denied the plaintiffs' version of what happened.  After the hearing an order was entered granting the motion to dismiss[2] with prejudice. 
The main thrust of plaintiffs' argument is that the trial justice treated defendant's Super.  R. Civ.  P. 12(b)(6) motion to dismiss as a Rule 56 motion for summary judgment and it should, therefore, be disposed of according to the pertinent provisions of Rule 56.  The defendant disagrees and argues that the procedure followed by the trial justice is authorized by Rule 12(d).  This provision provides for a preliminary hearing before trial on the defenses enumerated in Rule 12(b). 
The defendant is correct only up to a point.  A Superior Court justice may indeed conduct a hearing on a Rule 12(b) (6) motion.  Such a motion, however, is directed solely to the sufficiency of the complaint itself and if matters outside the complaint are considered by the justice, then Rule 12(b) specifically requires the motion to be considered as one for summary judgment. 
While the record does not disclose under what rule the trial justice granted the motion to dismiss, it is obvious that she considered matters outside the complaint.  She accepted opposing affidavits and heard conflicting testimony on the issue of estoppel. * 237 confilicting testimony on the issue of estopel. 
Accordingly, having delved into matters dehors the pleadings, the trial justice was bound to treat defendant's 12(b)(6) motion as one for summary judgment and dispose of it according to the pertinent provisions of the rule.  Ewing v. Frank, 103 R.I. 96, 234 A.2d 840 (1967); Warren Education Ass'n v. Lapan, 103 R.I. 163, 235 A.2d 866 (1967); DiBello v. St. Jean, 106 R.I. 704, 262 A.2d 824 (1970).  See Burns v. Hirsch, 108 R.I. 251, 256-57, 274 A.2d 421, 424 (1971).  See Professor Kent's commentary in 1 Kent, R.I. Civ.  Prac.  sec.  12.12 at 117-18. 
Although the trial justice did not comment on the evidence in her decision, it is evident from a reading of the transcript of the hearing on defendant's motion that she passed on the weight and credibility of the evidence.  This the Superior Court cannot do in passing on a Rule 56 motion for summary judgment; nor can it determine issues of fact.  It can only determine whether there are any issues of fact to be resolved.  If there are no issues of fact to be resolved it must grant the motion for summary judgment; on the contrary, if it finds that there are issues of fact, that is genuine issues of fact, then the Superior Court must deny the motion.  As the court said in Warren Education Ass'n v. Lapan, supra at 168-69, 235 A.2d at 869-70:
"When a motion is converted under rule 12(b) into one for summary judgment, there is a significant and noteworthy change in the issue presented to the court.  No longer is the inquiry of the court focused on a determination of the sufficiency of the complaint to set forth a valid claim for relief, as would be the situation under rule 12(b), but instead a decision must be made, after a review of the entire record, on whether there exists a factual issue contested by the parties, and, in the absence of which, whether as a matter of law one party is entitled to a judgment. 
"On a hearing on a motion under either rule 12(b) or rule 56, it is not the office of the trial justice to determine any issues of fact.  In such cases, all favorable inferences which can be drawn from matters properly before the court accrue to the benefit of the party against whom the motion is made.  Thus the pleadings under rule 12(b) and the entire record under rule 56 are scrutinized closely by the court in determining whether the movant has met his burden successfully; and correspondingly all pleadings and evidentiary documents filed by the non-moving party are viewed indulgently by the court.  6 Moore, Federal Practice (2d ed.), ¶  56.15, p. 2281.  The record in the instant appeal discloses that the above procedure was not adhered to by the trial justice." 
On this record we hold that the trial justice's failure to treat the defendant's motion as one for summary judgment is reversible error. 
The plaintiffs' appeal is sustained, the order entered in the Superior Court is reversed and the case is remitted to the Superior Court for further proceedings. 
NOTES
[1]  Rule 12(b) (6) in pertinent part reads as follows:

"(b) * * * Every defense, in law or fact, to a claim for relief in any pleading, whether claim, counterclaim, cross-claim, or third-party claim, shall be asserted in the responsive pleading thereto if one is required, except that the following defenses may at the option of the pleader be made by motion: * * * (6) failure to state a claim upon which relief can be granted * * *." 
[2]  The decision reads as follows:

"The [c]ourt has examined the pleadings and held an evidentiary hearing in connection with the motion to dismiss.  An examination of the cases with reference to the Rules, the pleadings and the evidence adduced, convinces this [c]ourt that the motion to dismiss be granted and such entry is made in connection with the above entitled case."