John Butler wrote:
> Hi,
> 
> Ive looked about and found some ways to do this but there must be a 1
> line quick way in ruby using regular expressions or something.
> 
> Basically i have a string "Test" and i want to see if it matches 3
> constants that i have defined.  If it does then i want to go route a,
> and if it doesnt i want to go route b,  so:
> 
> If "Test" (matches either of the following) string1, string2, string3
>  route a
> else
>  route b
> end
> 
> Anyone know the quick way?
> 
> JB

What's wrong with

if string1 == "Test" || string2 == "Test" || string3 == "Test"


-- 
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html