Forum: Ruby Array.join for nested arrays

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0bdb9e1d8ea8709fd4c39322ae8301a3?d=identicon&s=25 unknown (Guest)
on 2007-06-28 20:42
(Received via mailing list)

arr = [1, [2, [3, 4], 5], 6]

in Ruby 1.8.6 produces the following string:


Looking at the docs (e.g.,
Array.join should work as following:

"Returns a string created by converting each element of the array to a
string, separated by sep."

Doing the following:

arr.each do |e|

However, this is not what I expected - I would have expected:
This topic is locked and can not be replied to.