X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/6a62ba861098fb0992a12211df565b7e5dce2240..9565924bed8f9afd0682d4d029378711b905c550:/lib/rubyvote/condorcet.rb diff --git a/lib/rubyvote/condorcet.rb b/lib/rubyvote/condorcet.rb index 65c664d..c0539ab 100644 --- a/lib/rubyvote/condorcet.rb +++ b/lib/rubyvote/condorcet.rb @@ -184,7 +184,10 @@ class PureCondorcetResult < CondorcetResult def condorcet votes = @election.votes candidates = @election.candidates - + unless votes.length>0 and candidates.length>0 + @winners=[nil] + return @winners + end victors = Hash.new candidates.each do |candidate| victors[candidate] = Array.new