From: Kero van Gelder Date: 2001-08-05T01:40:33+09:00 Subject: [ruby-talk:19144] Re: Array.shuffle > 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 ---+