From: Victor qwerty Date: 2010-09-19T05:59:39+09:00 Subject: Re: converting number to its digits as an array Josh Cheek wrote: > On Sat, Sep 18, 2010 at 2:47 PM, Victor qwerty > wrote: > >> If I try one of these methods, I still can't go from element to element >> in the array. I don't want to just show a list, I want an actual array. >> -- >> Posted via http://www.ruby-forum.com/. >> >> > All of these methods return an Array. Why don't you show us what you're > trying to do. It says I can't do the each method, but if I have the array, can't I iterate through each element in the array? x = 5 ** 500 x.to_s.scan(/./) y = 0 x.each do |i| i.to_i y += i end puts y -- Posted via http://www.ruby-forum.com/.