On 6/29/07, freeunli / yahoo.com <freeunli / yahoo.com> wrote:
>
> Thus, arr.join(',') should be:
>
> 1, 2345, 6
>
> Am I missing something? How can I do the above?

Here's the most straightforward way:

arr = [1, [2, [3, 4], 5], 6]
a = ""
arr.each {|i| a << i.to_s << ","}
a.chop!

martin