Hi all, I want to generate a serial of 5 random numbers based on the size of an array(let say the size of array is 100). Here are the rules:1) 5 random numbers are different 2) Once they are generated they can''t appear in the next round of random numbers. What is the better way to do this? Now what I think of is to remove the items corresponding to the random number from the previouse array and eventually my array is smaller and smaller. Any other idea? Thanks, Li -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---