From: Paul Stickney Date: 2007-03-24T08:20:07+09:00 Subject: Re: How to Convert String to Array require 'yaml' some_obj = YAML.load(gets.chomp) rescue nil If your input is "[1,2,3,4]" then it will return an array with 4 elements of 1, 2, 3 and 4, respectively. Of course, you could input any valid (or not so valid) YAML and get back a String or Hash or.... The rescue is just to ensure we get a nil instead of an error on really bad input. Enjoy, Paul