Percy said, "As a school prefect -" but Harry had lost his temper. He pulled out his wand and shouted, "Expelliarmus!" and just as Snape had disarmed Lockhart, so Malfoy found the diary shooting out of his hand into the air. Ron, grinning broadly, caught it.