24/08/2016 11:30 PM AEST

Naya Rivera Opens Up About Having An Abortion While Starring On 'Glee'

'It was very scary to open up about everything.'

David Livingston via Getty Images
Naya Rivera on April 15 in Beverly Hills, California.

In her new memoirSorry Not Sorry: Dreams, Mistakes and Growing UpNaya Rivera gets real.

The 29-year-old writes about having an abortion while filming the hit show “Glee” in 2010. In an excerpt published exclusively by People, Rivera says that she’d recently split with her boyfriend, Ryan Dorsey, to focus on her career, only to find out she was pregnant with his child a few weeks later. 

The actress said she did not reveal her pregnancy to Dorsey and opted to terminate it.

“It was very scary to open up about everything,” the actress told People. “It’s not something a lot of people talk about, but I think they should. I know some people might read it and say, ‘What the Hell?’ But I hope someone out there gets something out of it.”

Rivera and Dorsey ended up getting back together a few years later and married in 2014. The two welcomed a son, Josey, the next year.

Greg Doherty via Getty Images
Naya Rivera and Ryan Dorsey on Jul. 27 in Studio City, California.

“I hope Josey will read [my book] one day,” the actress said. “I hope it gives him a better perspective on the issues women face.”

Rivera also posted a message on Twitter early Wednesday saying that she also hopes fans understand why she chose to share such personal information. 

To read the rest of Rivera’s interview with People, head here. Look for her book when it comes out Sept. 13.