X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/d28621e0b11f6e5f2971f0694726c5a926ab28ba..00afdac0dfc6a9073e196a80e62a203ffcc457bf:/lib/rubyvote/condorcet.rb diff --git a/lib/rubyvote/condorcet.rb b/lib/rubyvote/condorcet.rb index 7153995..08fd2df 100644 --- a/lib/rubyvote/condorcet.rb +++ b/lib/rubyvote/condorcet.rb @@ -208,10 +208,11 @@ class PureCondorcetResult < CondorcetResult def condorcet votes = @election.votes candidates = @election.candidates - unless votes.length>0 and candidates.length>0 - @winners=[] - return @winners + + unless votes.length > 0 and candidates.length > 0 + return @winners=[] end + victors = Hash.new candidates.each do |candidate| victors[candidate] = Array.new