From: 7stud -- Date: 2009-04-30T20:14:56+09:00 Subject: Re: find if an array has any element present in another arra as wrote: > > (a-b).nil? result = [1] - [2, 3] #no common elements p result result = [2, 3] - [2] #common elements p result --output:-- [1] [3] -- Posted via http://www.ruby-forum.com/.