From: "yermej@..." Date: 2007-07-01T14:20:01+09:00 Subject: Re: Test equality of each element in an array On Jun 30, 11:00 pm, 12 34 wrote: > I want to see if any element of an array is equal to a file extension > I would use Array's include? method: ext_not_to_move = ['jpg', 'pdf', 'mrw'] if ext_not_to_move.include? File.extname(fn).downcase # do stuff end And use downcase so you don't have to include variations of each extension (jpg, JPG, jpG, etc.). Jeremy