From: Mikel Lindsaar Date: 2008-05-12T17:48:08+09:00 Subject: Re: Convert integer to array? On Mon, May 12, 2008 at 6:36 PM, Nadim Kobeissi 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"] Mikel http://lindsaar.net/