X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/1723e5c01789f5240a148a4671492de6a7438abd..ebb1c7006d50d8761066bcd5d0e6bbc347b9e0c8:/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