From: "Bartosz DziewoƄski" Date: 2012-10-12T03:31:56+09:00 Subject: Re: Convert elements of array into a single integer 2012/10/11 Anna Baas : > x = some_integer > y = "#{x}".scan(/./) Assuming y is an array like ['1', '2', '3']: # join the array into a string like "123" and convert to an integer: x = y.join('').to_i The other way around can be done similarly: y = x.to_s.split('') # convert integer to string and split between characters -- Matma Rex