From: Tom Ha Date: 2009-08-10T00:54:31+09:00 Subject: How to define doubles: Array-to-hash Hi there, Assume the following array (contains doubles): original = [1, 2, 3, 3, 3, 3, 4, 4, 5] What's the most efficient way to obtain a hash that tells me what elements of "original" have more than 1 appearance/entry (= doubles)? The result should look like this: result = {"3"=>4, "4"=>2} Thanks for your help! Tom-n00b -- Posted via http://www.ruby-forum.com/.