summaryrefslogtreecommitdiff
path: root/doc/string/intern.rdoc
blob: 1336e4688f7a2e2636b30eff23d10be3c895ae3c (plain)
1
2
3
4
5
6
7
8
9
Returns the Symbol object derived from +self+,
creating it if it did not already exist:

  'foo'.intern       # => :foo
  'тест'.intern      # => :тест
  'こんにちは'.intern # => :こんにちは

Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].