Ruby - 文字列をシンボルに変換する

"string".to_sym
=> :string

やってはいけない例

":string".to_sym
=> :":string"