Ricin is highly toxic, but castor oil is refined, so it is safe to consume. Although refined castor oil is edible.
But castor seeds are deadly; a single castor seed can poison a horse, and its toxicity comes from ricin, a substance so poisonous that workers who collect castor seeds must follow strict specifications to avoid accidental death. Nonetheless, many workers who collect castor seeds are still inadvertently poisoned.
Expanded Information:
The oil obtained by cold pressing is called No. 1 castor oil. The cake is crushed and pressed again or leached to produce No. 3 castor oil (no No. 2) for industrial use. Castor oil obtained by direct pressing with screw press or pre-pressing - leaching can only be used as industrial oil. Castor oil is a pale yellow viscous non-drying oil, soluble in most organic solvents other than fatty acid hydrocarbons, especially with the characteristics of alcohol show solubility.
People's Daily Online - Wary of 15 kinds of commonly eaten food poisonous
Baidu Encyclopedia - castor oil