"Well -- in that case..." said Professor McGonagall, staring at the three of them, "Miss Granger, you foolish girl, how could you think of tackling a mountain troll on your own?"
Hermione hung her head. Harry was speechless. Hermione was the last person to do anything against the rules, and here she was, pretending she had, to get them out of trouble. It was as if Snape had started handing out sweets.

Harry Potter and the Philosopher's Stone - Chapter 10 : Halloween
See this quote in the Pensive -