From: Sam Roberts Date: 2007-03-06T13:03:53+09:00 Subject: Re: [PATCH] Join with block Quoting farrel.lifson@gmail.com, on Tue, Mar 06, 2007 at 07:37:37AM +0900: > On 05/03/07, Steven Lumos wrote: > >Why bother passing sep to the block? > > If the block is a pre-existing proc object there's no guarantee it > will have access to whatever is passed to the join method as the > separator. I think its strange, too, if your join needs something known locally, and uses a pre-existing block, its easy to handle: [1,2,3].join{|a,b| block.call(' -- ', a, b)} but passing an arg to join which is then passed unchanged to the block seems odd, the nice thing about blocks is they are part of the calling environment, its there for free. Sam