>>>>> "S" == Shannon Fang <xrfang / hotmail.com> writes:

S> if ([string] & array_of_strings).length!=0 then....

 Well, you can perhaps use Array#include?

pigeon% ri Array#include?
--------------------------------------------------------- Array#include?
     arr.include?( anObject ) -> true or false
------------------------------------------------------------------------
     Returns true if the given object is present in arr (that is, if any
     object == anObject), false otherwise.
        a = [ "a", "b", "c" ]
        a.include?("b")   #=> true
        a.include?("z")   #=> false

pigeon%

S> But it seems not working. My question is, what is the keyword "in" used for? 

 used by `for'

      http://www.ruby-lang.org/en/man-1.4/syntax.html#for


Guy Decoux