Mass.R.Civ.P. 56, 365 Mass. 824 (1974), and gave the parties a reasonable opportunity to present pertinent materials beyond those encompassed by the complaint. See Stop & Shop Cos. v. Fisher, 387 Mass. 889, 892 (1983). In particular, the at tachments to the department’s motion contained an affidavit of the defendant Michael T. Maloney who, by 1998, had become the Commissioner of Correction. The affidavit states, among other things, that “a comparable DDU for female inmates has not, and may never be constructed.” By adopting the department’s position as expressed in its memorandum in support of the motion, the motion judge considered this affidavit and other supplemental material in rendering her decision. See Brookline v. Medical Area Serv. Corp., 8 Mass. App. Ct. 243, 245 n.7 (1979) (<HOLDING>). Furthermore, by his submission of materials
holding that a rule 12b6 motion to dismiss should be treated as a motion for summary judgment when plaintiffs counsel relied upon facts outside the four corners of the complaint during oral argument of the motion holding that the motion judge by not excluding additional materials treated the motion as one for summary judgment despite the fact that the judgments entered were mislabelled holding that in ruling on a motion for summary judgment the trial court is limited to the grounds raised in the motion holding that where a court considering a rule 12b6 motion relies on matters outside the pleading the motion must be treated as a rule 56 motion for summary judgment holding that motion to dismiss cannot be treated as summary judgment