#filter_out and PureCondorcet weren't getting along well for sparse elections
[rubyvote] / lib / rubyvote / election.rb
index 4499233ebb0bda4e0f305c6a853bbbf7c96ed454..4d51d78b86027014236b0fc581cf070e33bf4486 100644 (file)
@@ -63,12 +63,7 @@ class ElectionVote
   end
 
   def filter_out(winner)
-    if winner.winners[0].class == Array
-      to_filter = winner.winners[0]
-    else
-      to_filter = [winner.winners[0]]
-    end
-    @candidates.delete_if {|x| to_filter.include?(x)}
+    @candidates.delete_if {|x| winner.winners.include?(x)}
   end
 
 end

Benjamin Mako Hill || Want to submit a patch?