From: James Edward Gray II Date: 2007-03-27T02:36:29+09:00 Subject: Re: How to Convert String to Array On Mar 23, 2007, at 5:36 PM, Shengzhi Li wrote: > Newb question: I want to read the user input an array of numbers. Is > this possible? Sure: $ ruby -rubygems read_array.rb Enter some numbers: 1 2 3 You entered: [1, 2, 3] $ cat read_array.rb #!/usr/bin/env ruby -w require "highline/import" array = ask("Enter some numbers:", lambda { |n| Integer(n) rescue n }) do |q| q.gather = String.new end puts "You entered: #{array.inspect}" __END__ Hope that helps. James Edward Gray II