X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/21e8998e39385a5cfd90ef597ccdbd760227baa7..ebb1c7006d50d8761066bcd5d0e6bbc347b9e0c8:/lib/rubyvote/condorcet.rb?ds=sidebyside 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