> How about:
> 
>         self[i-1], self[r] = self[r], self[i-1]

I'm just not completely adapted to Ruby, yet :)

> Didn't measure the speed...

One assignment extra perhaps, but same amount of array
indexing (== method lookup?). Shouldn't matter.

+--- Kero ------------------------------ kero / chello.nl ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ------- http://members.chello.nl/~k.vangelder ---+