Hi --

On Wed, 27 Nov 2002, Gavin Sinclair wrote:

> From: <nobu.nokada / softhome.net>
>
>
> > Hi,
> >
> > At Wed, 27 Nov 2002 20:18:15 +0900,
> > Tim Bates wrote:
> > > > if ([string] & array_of_strings).length!=0 then....
> > >
> > > I don't know what 'in' is used for, but another way to do this might be
> > > if [array_of_strings].index(myString) then...
> >
> > Or:
> >
> >   array_of_strings.include?(myString)
> >
>
> I've often thought that Array#=== should do the same thing as Array#include?
> It seems wasted to be the same as ==.

Don't forget that === is the case equality operator, so that would
mean that case statements involving arrays were testing for element
inclusion instead of array equivalence.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav