RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

When should I use a Set in Ruby?

Array is so common in Ruby and well done (especially as a litteral) that it's usually the first choice as a collection. But sometimes we need to avoid duplicates, and we end to duplicate a lot of checks to do that. The post explains that use case and suggests a solution..

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!