Nadim Kobeissi wrote: > Let's say I have: > x=1234 > How can I convert that to the follow array: > x=[1, 2, 3, 4] A solution that doesn't use strings: result_array = [] while x > 0 result_array.unshift x % 10 x /= 10 end result_array This will "destroy" x, though. HTH, Sebastian -- NP: Depeche Mode - It's No Good Jabber: sepp2k / jabber.org ICQ: 205544826