On Tue, Feb 16, 2010 at 8:10 AM, rahtha <rahul.that...@gmail.com> wrote:

> I have two arrays and i want to get all items which are NOT common to
> both, so basically if i have two arrays A and B, i want all elements
> in A that are not in B. what is the best way to do this apart from
> using two nested loops.

But do you want the ones in B that are not in A as well? (symmetric difference)

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to