Thanks :). The to_s method didn't seem to be working in that case because I thought doing final + e.to_s should cause final to have the value of e.to_s added to it. What I really needed to do was final += e.to_s. The worst thing is I made the exact same mistake in Icon just a few days ago ;).Thanks again. Jeremy Gregorio rsilvergun / home.net ----- Original Message ----- From: Kero van Gelder <kero / d4050.upc-d.chello.nl> To: ruby-talk ML <ruby-talk / ruby-lang.org> Sent: Sunday, October 07, 2001 10:10 AM 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 ---+ >