Re: Update to Array#join
Ryan Davis <[email protected]> Thu, 15 Feb 2007 02:35:24 -0800
| Newsgroups | gmane.comp.lang.ruby.documentation |
|---|---|
| Message-ID | <[email protected]> |
On Feb 14, 2007, at 6:39 PM, Gary Wright wrote: > > On Feb 14, 2007, at 8:15 PM, Gavin Kistner wrote: >> I think it's far clearer to simply say that the array is flattened >> (in effect, though not by calling #flatten) before being joined. >> > > Yes, I thought about that but #flatten isn't actually called and so > I thought that would be misleading. Also it would imply that an > intermediate representation of the array is constructed, which also > isn't true. I figured that adding the caveats would be more confusing > then simply avoiding the term 'flatten'. try something like: Every sub-array is converted to a string by applying join recursively, essentially flattening the array.