X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/9953cb5cdef82f0e44f07dd089fde77ede170712..11d22a5307695910493266b16718e1ffa201676d:/lib/rubyvote/condorcet.rb diff --git a/lib/rubyvote/condorcet.rb b/lib/rubyvote/condorcet.rb index c0539ab..0b7a306 100644 --- a/lib/rubyvote/condorcet.rb +++ b/lib/rubyvote/condorcet.rb @@ -185,7 +185,7 @@ class PureCondorcetResult < CondorcetResult votes = @election.votes candidates = @election.candidates unless votes.length>0 and candidates.length>0 - @winners=[nil] + @winners=[] return @winners end victors = Hash.new @@ -224,7 +224,7 @@ class CloneproofSSDResult < CondorcetResult def cpssd votes = @election.votes candidates = *@election.candidates - + def in_schwartz_set?(candidate, candidates, transitive_defeats) candidates.each do |challenger| next if candidate == challenger