On Thursday 07 January 2010, Jagadeesh wrote: > |Here is how I am trying to do with array > | > |states = ['open', 'analyzed', 'feedback', 'closed'] > | > | unless ( ( states.grep('closed').empty? || states.grep > |('feedback').empty? ) \ > | && (states.grep('open').empty? ||states.grep > |('analyzed').empty? ) ) > | puts "hello" > | end > | > |Thanks Still I don't understand exactly what you're trying to do. states contains all the four entries, so states.grep will never return an empty array and the puts will always be executed. Please, can you explain in detail what you're trying to do? This way we'll be able to help you better. Stefano