Le Thu, 30 Apr 2009 12:57:23 +0200,
as <nosp@m.invalid> a écrit :
> Le Thu, 30 Apr 2009 05:52:26 -0500,
> Charanya Nagarajan <charanya.nagarajan@tcs.com> a écrit :
>
> > I have 2 lists
> >
> > a=[1,2,3,4]
> > b=[2,4,6,7,8]
> >
> > I want to find if there are any elements present in "a" which are
> > also present in "b".
> > I jus wanna "true" or "false" answer if both of the arrays have any
> > element in common.
>
> (a-b).nil?
Ouch, sorry, (a&b).empty?
--
Arnaud Schmittbuhl