From: Nikodemus Siivola Date: 2002-09-22T18:30:54+09:00 Subject: Re: Inverse of id2name? On Sun, 22 Sep 2002, Dave Thomas wrote: > > If I have a variable set to "test", how do I convert that to :test? > > a.intern I was looking for the exact same thing last week -- and being too timid to ask the list did not find it -- and went with eval. Hence two notes: * ri Fixnum.id2name refers to String.intern, but ri Symbol.id2name does not. In the next update to ri's db, maybe this could be added? * alias String.intern to String.name2id and String.to_symbol (or String.to_sym) for moron's like me. ;) -- Nikodemus