# coding: euc-jp

a = "1234"
b = []
y = a.split("")
y.each do |z|
  b.push(z.to_i)
end
p b

# C:\work>ruby spl.rb
# [1, 2, 3, 4]