Can you end a multi-sentence quotation with a comma?

Solution 1:

I would write it: "I left the oven on. Rats", he said.

"Rats! I left the oven on," he said.

Or as @Erik Kowal suggested:

"I left the oven on. Rats!" He said.