On Sun, 2002-02-17 at 20:40, David Alan Black wrote:
> It actually returns the position in the string where the match
> starts, or nil if there's no match.  If you wanted it to return
> true or false (but not nil), I guess you could do:
> 
>   (x =~ /pat/) && true || false
> 
> Or could you get your class to recognize more general true/false
> equivalences?  Or is there some nicer/shorter way to do it
> I'm not thinking of? :-)

What about:

    (x =~ /pat/) != nil

Cheers,

Neil

-- 
Neil Conway <neilconway / rogers.com>
PGP Key ID: DB3C29FC