The exception is for quotations.
"I'm ready to leave now," he said. The comma ends the quotation, which is indicated by the close-quotation marks, and the entire sentence (the part that includes "he said") is ended with the period.
Note that in American English, the period or comman ALWAYS goes...