From: Swaroop C H Date: 2007-07-01T13:08:28+09:00 Subject: Re: Test equality of each element in an array > if extNot2Move.{any of the elements} == File.extname(fn) ## this is > the test I'm interested in > I think I could do it with a extNot2Move.each with a block > following, but it seems like their should something more concise. Why not use a regex? irb(main):002:0> File.extname('foo.jpg') =~ /\.(jpg|JPG|pdf|PDF|MRW)/ => 0 # 0 is the position where the regex matched irb(main):003:0> File.extname('foo.zip') =~ /\.(jpg|JPG|pdf|PDF|MRW)/ => nil Thanks, Swaroop