From: Dan Connelly Date: 2012-06-15T01:52:56+09:00 Subject: Re: string.chars.to_a question Michael Sung wrote in post #1064374: > string = string.chars.to_a > length = string.length > newString = Array.new > > while length >= 0 > newString << [string[length]] > length = length - 1 > > end > A few comments... 1. I'd not call arrays "strings". It's confusing. "newString" isn't a string here. 2. Why is "string[length]" surrounded by "[]" ? This creates an array of 1-element arrays. Is this what you want? 3. you first take the element string[string.length]. This is nil. Is this what you want? Are you trying to implement string.reverse ? -- Posted via http://www.ruby-forum.com/.