If you have an array of 1 to 500 called 'a' and you wanted to know if any were missing you could do:
a.uniq.size and if that doesn't equal 500 you are missing some. If you need to know which ones are missing you could create a new array of 1 to 500 and subtract the original b = (1..500).to_a b - a --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

