The shares of the surviving spouse as to real property as provided in this chapter and in section 10 of this title are in lieu of all rights of dower or curtesy therein. All rights of dower or curtesy in the estate of any person who dies after the effective date of this Code are abolished.