]> projects.mako.cc - selectricity/blobdiff - lib/rubyvote/condorcet.rb
Merge head
[selectricity] / lib / rubyvote / condorcet.rb
index c0539abea5f02aa5b11ddda80fd41f68e78b9b8e..0b7a3062afce476f5711fe8ce471c61264d61a87 100644 (file)
@@ -185,7 +185,7 @@ class PureCondorcetResult < CondorcetResult
     votes = @election.votes
     candidates = @election.candidates
     unless votes.length>0 and candidates.length>0
     votes = @election.votes
     candidates = @election.candidates
     unless votes.length>0 and candidates.length>0
-      @winners=[nil]
+      @winners=[]
       return @winners
     end
     victors = Hash.new
       return @winners
     end
     victors = Hash.new
@@ -224,7 +224,7 @@ class CloneproofSSDResult < CondorcetResult
   def cpssd
     votes = @election.votes
     candidates = *@election.candidates
   def cpssd
     votes = @election.votes
     candidates = *@election.candidates
-
+    
     def in_schwartz_set?(candidate, candidates, transitive_defeats)
       candidates.each do |challenger|
         next if candidate == challenger
     def in_schwartz_set?(candidate, candidates, transitive_defeats)
       candidates.each do |challenger|
         next if candidate == challenger

Benjamin Mako Hill || Want to submit a patch?