Rebel Wilson was a self-proclaimed good student in high school, but she did manage some mischief too.

Wilson opened up about her school days when she appeared on "Jimmy Kimmel Live!" on Tuesday night to promote her Netflix comedy "Senior Year." Wilson plays a 37-year-old cheerleader who wakes up from a 20-year coma in the movie.

The actress, who brought a copy of her high school yearbook with her, took a trip down memory lane with host Jimmy Kimmel.

Wilson, who attended an all-girls Christian boarding school, said that while she was a good student, she was also "a little bit cheeky." In fact, she was cheeky enough to make one of her teachers cry!

"In the boarding house, I would mastermind the escapes because there was a boy's school next door. We had bars on our windows — it was that type of good Christian school. And then I would organize the escapes to go. I'd work out all the passcodes for the alarms, like, 'Let's go, let's go.' Then one time, I locked a teacher in a cupboard for four hours," Wilson told Kimmel.

Apparently, her prank wasn't without reason. "She was a mean teacher! It was really good revenge!" she revealed.

The "Pitch Perfect" actress told her teacher there was something in the cupboard, and while she peeked in, Wilson pushed her in and locked the door for four hours.

Looking back, Wilson feels a little remorseful about it, because what was meant to be a harmless prank had made the teacher cry. "I know it's a bit bad. I feel a bit bad now," she said.

But, the teacher never found out who was behind it.

"She could never tell which girl it was that pushed her in. So, they lined us up and were like, 'Which one was it?' And I'm like, 'Don't say anything, guys. Don't say anything.' And then no one ratted me out," Wilson said.

When Kimmel joked that Wilson must have "commanded a lot of respect" at the school for classmates to not name her as the culprit, she said she was "the second most popular girl" at school.

"I was voted deputy head girl, which is kind of like the second most popular girl at the school," she said, explaining why she was on the front cover of the yearbook.

"Senior Year" is slated to release on May 13 on Netflix, according to IMDb.

Rebel Wilson
Rebel Wilson attends the 2016 Vanity Fair Oscar Party Hosted By Graydon Carter at the Wallis Annenberg Center for the Performing Arts on Feb. 28, 2016 in Beverly Hills, California. Getty Images/Pascal Le Segretain