From: Jarmo Pertman Date: 2009-01-31T22:39:15+09:00 Subject: Re: if statement not working with Hash object Also, line: words = (count1.keys).uniq is not needed, since hashes won't have duplicate keys. You could also refine your loop also somehow like this: count1.each_pair do |word, count| if word !~ /Date1|packageId/ && [1,3,5,7,9,11].include?(count) puts "Discrepancy: #{word}" puts count end end Cheers, Jarmo -- Posted via http://www.ruby-forum.com/.