From: Zebulon Bowles Date: 2013-01-30T05:40:53+09:00 Subject: newbie question.. So I'm taking a class on Ruby and it seems as though the teacher has thrown something over my head. List how many times each number from 0 to 9 was mentioned. Example input: > ruby most-common.rb 4 2 1 1 1 2 Example output: 1 was mentioned 3 time(s). 2 was mentioned 2 time(s). 4 was mentioned 1 time(s). The numbers in the command-line arguments must always be between 0 and 9, inclusive. Do I loop over each element of an array of ARGV's and test to see if each new element of the array is equal to any of the others. And if so, do I set up a count? numbers = ARGV for number in numbers if number > 0 && < 9 ??????????????????? end puts "#{number} was mentioned #{count} times? AHHHGH!!!! -- Posted via http://www.ruby-forum.com/.