From: an an Date: 2008-02-09T04:17:53+09:00 Subject: Re: converting strings to booleans, symbols, etc Day wrote: > On Feb 8, 2008 12:51 PM, an an wrote: > >> I am parsing an xml document, and I wanted to know if there is a quick >> built in way to convert a string to a symbol or a boolean. > > The symbol is easy, anyway: > http://www.ruby-doc.org/core/classes/String.html#M000825 > > Once you're there, making a compare for true/false isn't so much code. > But maybe someone else has a cleaner solution to that. > > > Ben thanks...thats the type of stuff i was looking for...im used to java, and I am actively tried to avoid coding Java style in ruby, but sometimes its hard to figure out the shortcuts that ruby provides -- Posted via http://www.ruby-forum.com/.