From: Trans Date: 2007-01-04T01:30:12+09:00 Subject: Re: Mini-RCR: Extra Argument for Array#join Robert Dober wrote: > slice(0..-2).old_join(sep) << last_sep << last.to_s > or maybe > "#{slice(0..-2).old_join(sep)}#{last_sep}#{last}" > > I like your approach of using old_join again, it seems so abstraction based, :-) > but as we are looking for performance ;) Yep, even better. I'll credit you and add this to Facets, but I'd rather name it something other than #join. Right now I have #join_sentence, but that's rather long. Any suggestions? And for what it's worth, IMO a block additon to join certainly couldn't hurt. In fact it would be quite nice for alternating separators. hash.to_a.flatten.join{ |index| index % 2 == 0 ? ':' : "\n" } Or something like that. T.