From: 12 34 Date: 2007-06-21T04:07:13+09:00 Subject: if == any item in an array I'd like to write something like PhotoEndings = %w[JPG,MRW,JPE] MovieEndings = %w[AVI] case ext # determined from the photo file name when PhotoEndings when MovieEndings else end I don't have to use case, any conditional will do. Thanks. I hope I have explained this. I have no idea what to search for. I did try some, but I'm a newbie and don't understand the more advanced syntax. I tried when PhotoEndings.any and when PhotoEndings.or Wild guesses, but they don't work. -- Posted via http://www.ruby-forum.com/.