Hi -- On Mon, 12 May 2008, Mikel Lindsaar wrote: > On Mon, May 12, 2008 at 6:36 PM, Nadim Kobeissi <kaepora / mac.com> wrote: >> Let's say I have: >> x=1234 >> How can I convert that to the follow array: >> x=[1, 2, 3, 4] > > irb(main):001:0> x=1234 > => 1234 > irb(main):002:0> x = x.to_s.split('') > => ["1", "2", "3", "4"] That's an array of strings rather than integers, though. See my other reply, using scanf. David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!