Hal E. Fulton wrote: > str = <<EOF > 123 4.567 "John Smith" %w[a b c] [1,2,3] {5=>6} true nil > EOF > > values = str.parse > # values should now be: > # [123, 4.567, "John Smith", ["a", "b", "c"], [1,2,3], > # {5=>6}, true, nil] Inefficient, but it seems to work... result = [] until str.empty? n = 1 loop do begin eval str[0...n] rescue Exception else break if str[n,1] == " " or n == str.length end n += 1 end result << eval(str.slice!(0...n)) end p result You could tighten it up a bit by not eval-ing unless the substring is followed by a space or the end of the string.