Harry, Ron, and Hermione were quite shocked at the sight before them. They thought they'd surprise Ginny with their triumphant return. Instead, they were surprised to walk in on Ginny, quite naked, on her bed with an equally naked Luna, engaged in activities we can't describe in detail in this novel.
After backing out of Ginny's room and closing the door, noticeably far more embarrassed than either of the young women, who greeted them with a warm welcome, Ron spoke what all three were thinking when he said "Now, that's going to leave a permanent mental scar."
