From: 7stud -- Date: 2012-09-15T13:19:52+09:00 Subject: Re: how to write a array into a string 7stud -- wrote in post #1076100: > arr = ['a', 'b', 'c'] > str = arr.each_with_index do |num, i| > puts "#{i} => #{num}" > end > Whoops. Chopped off a line there: > p str > --output:-- > 0 => a > 1 => b > 2 => c > ["a", "b", "c"] > -- Posted via http://www.ruby-forum.com/.