(CNN) During a recent radio interview, Sen. Kamala Harris admitted to smoking weed in the past.

"I did inhale," the California Democrat said, laughing. "It was a long time ago."

Harris' views on marijuana have changed over the years. She expressed opposition in 2010, then voiced support for medical marijuana legalization five years later. Now she's expanding her support to recreational use as well. The senator's evolution on pot pairs closely with the changes in public opinion on the issue.

In her new book released last month, Harris wrote that marijuana should be legalized and nonviolent marijuana-related offenses should be cleared from people's records. "We need to legalize marijuana and regulate it," Harris writes. "And we need to expunge nonviolent marijuana-related offenses from the records of the millions of people who have been arrested and incarcerated so they can get on with their lives."

She goes on in the book to discuss the need for a breathalyzer equivalent to determine levels of marijuana use and her other concerns regarding marijuana use.

Read More