- @votes[winner] = Hash.new unless @votes.has_key?(winner)
- @votes[loser] = Hash.new unless @votes.has_key?(loser)
+ losers.each do |place|
+ place = [place] unless place.class == Array
+ place.each do |loser|
+
+ winners = [winners] unless winners.class == Array
+ next if winners.include?(loser)
+ winners.each do |winner|
+ @votes[winner] = Hash.new unless @votes.has_key?(winner)
+ @votes[loser] = Hash.new unless @votes.has_key?(loser)
+
+ if @votes[winner].has_key?(loser)
+ @votes[winner][loser] += 1
+ else
+ @votes[winner][loser] = 1
+ end