From: Jean-Julien Fleck Date: 2010-04-09T17:13:04+09:00 Subject: Re: match at least one element of array to another Hello, > I want these to be true because 4 is in both @groups and @allowed. You could check something like sum = @groups+@allowed if sum.uniq != sum what_you_want_to_do_if_same_elements end Example: >> a,b,c = [1,2],[2,3],[4,5] => [[1, 2], [2, 3], [4, 5]] >> (a+b).uniq != (a+b) => true >> (a+c).uniq != (a+c) => false Cheers -- JJ Fleck PCSI1 Lycée Kléber