From: Eric Schwartz Date: 2003-06-07T06:07:47+09:00 Subject: Re: [RCR] join block Joel VanderWerf writes: > Somehow, I would expect Array#join to pass two args to the block, like this: > > [1,2,3].join {|x,y| x < y ? " < " : " >= " } > > # ==> "1 < 2 < 3" I can't figure out how that would happen. I'd think you'd end up rather with something more like "1 < 2 2 < 3" or something equally weird. My guess is you're implicitly assuming some sort of folding operation going on behind the scenes which is not (to my mind) implied by 'join'. Array#join({block}) seems to me like it should behave as the OP described: yield every element to {block}, and catenate the results. -=Eric -- Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton.