From: Kero van Gelder Date: 2001-10-08T02:10:25+09:00 Subject: [ruby-talk:22201] Re: newbie question about strings > Anyone know how to convert an integer to a string? I tried to do this: > > def to_s() > > final = "" > @edges.each {|e| final + e + " " } > return final > > end #method to_s > > Where @edges is an integer array. But it can't convert e to a > string. The << operator wants to convert any number < 255 to a > character, which isn't what I want. I suppose I could write a > method, but it'd be better to use what's built in if I can. Thanks > in advance. You already have the name of the method; just apply it to e: e.to_s Bye, Kero. +--- Kero ------------------------------ kero@chello.nl ---+ | Don't split your mentality without thinking twice | | Proud like a God -- Guano Apes | +--- M38c ------- http://members.chello.nl/~k.vangelder ---+