Rake (Someone) Over the Coals

What does the idiom “Rake (Someone) Over the Coals” mean?

Definition:

To scold someone severely

For example:

“My teacher really raked me over the coals today about talking in class.”

Notes:

“Rake (someone) over the coals” is the usual American version.