From: David Garamond Date: 2003-11-26T23:03:34+09:00 Subject: Re: turning a string into array of ASCII bytes Peter wrote: >>What is the shortest, most straightforward way (without temporary >>variables, etc)? >> >>My best route is now "1234".split(//).collect{|c|c[0]} but I'm sure >>there is a much better way. Also it's a bit slow. > > > irb(main):003:0> "1234".unpack("c*") > => [49, 50, 51, 52] > > Is that what you want? Of course. I forgot all about pack/unpack. Thanks! -- dave