------art_145852_24171682.1167842884185
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 1/3/07, Trans <transfire / gmail.com> wrote:
>
>
> 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.


I am flattered , thx :) concerning the block  I have to admit that Devin has
come up with that idea early in the thread already!
Cheers
Robert

T.
>
>
>

-- 
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay

------art_145852_24171682.1167842884185--