Victor qwerty wrote:
> I'm new to ruby and I was trying to solve a problem where I convert a
> number into an array in such a way.
> 
> If I have the number 12345, how do I take that number and put it into an
> array but where each element is a digit of the number 12345?
> 
> If this is the wrong place to have posted such a question (for various
> reasons) then let me know.

irb(main):001:0> "12345".scan(/./)
=> ["1", "2", "3", "4", "5"]
-- 
Posted via http://www.ruby-forum.com/.