Re: [MacRuby-devel] convert array into a string

2011-01-10 Thread Henry Maddocks
On 11/01/2011, at 10:29 AM, Joel Reymont wrote: > How do I lookup documentation? In your terminal ri Array#pack or Google. Henry ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/mac

Re: [MacRuby-devel] convert array into a string

2011-01-10 Thread Joel Reymont
On Jan 10, 2011, at 9:19 PM, Laurent Sansonetti wrote: > Assuming your array contains ASCII fixnum representation of characters, > messaging #pack('c*') on it should give you a string object back. Do you mean something like [-188,-185,-186].#pack('c*') ? > You can look up the documentation of

Re: [MacRuby-devel] convert array into a string

2011-01-10 Thread Laurent Sansonetti
On Jan 10, 2011, at 1:22 PM, Caio Chassot wrote: > On 2011-01-10, at 19:19 , Laurent Sansonetti wrote: >> >> Assuming your array contains ASCII fixnum representation of characters, >> messaging #pack('c*') on it should give you a string object back. >> >> I dislike this method, but here I don't

Re: [MacRuby-devel] convert array into a string

2011-01-10 Thread Caio Chassot
On 2011-01-10, at 19:19 , Laurent Sansonetti wrote: > > Assuming your array contains ASCII fixnum representation of characters, > messaging #pack('c*') on it should give you a string object back. > > I dislike this method, but here I don't see a better choice. numbers = [65, 195, 169] s = numbe

Re: [MacRuby-devel] convert array into a string

2011-01-10 Thread Laurent Sansonetti
Assuming your array contains ASCII fixnum representation of characters, messaging #pack('c*') on it should give you a string object back. You can look up the documentation of Array#pack for more information. I dislike this method, but here I don't see a better choice. Laurent On Jan 10, 2011,