將字串轉換為符號

鑑於 String:

s = "something"

有幾種方法可以將它轉換為 Symbol:

s.to_sym
# => :something
:"#{s}"
# => :something