"robertj" <robert_kuzelj / yahoo.com> writes:

>hi,

>is there a String#to_sym method anywhere in the
>statndard lib? i couldnt find anything like that
>but maybe i missed it.

It's called "intern", because Ruby internalizes the string into a symbol.
And it's rather more efficient than the eval method you propose.

irb(main):001:0> "somestring".intern
=> :somestring