From: Robert Klemme Date: 2007-08-21T23:19:05+09:00 Subject: Re: How to "cast" in Ruby 2007/8/21, Kaldrenon : > On Aug 21, 8:13 am, Marcin Tyman wrote: > > David, > > Your solution doesn't work correctly. I've resolved this like that > > > > temp = String.new("#{el.elements["id"].get_text}") > > arr << temp.to_i > > How about: arr << "#{el.elements["id"].get_text}".to_i ? Then I'd still prefer arr << el.elements["id"].get_text.to_s.to_i String interpolation for just one value doesn't really make sense. robert