Alex Gutteridge wrote:
> 
> You don't check that index < recipient_array.size so if enough last 
> names
> match recipient_array[index] will be out of bounds. In Ruby Array.[]
> returns nil for out of bounds indices. To answer your exact question the
> random order given by shuffle! will be different each time you run the
> program so although the input is the same the result of your algorithm 
> is
> not.


Aaaah, that makes perfect sense. Thanks for the help.
-- 
Posted via http://www.ruby-forum.com/.