projects
/
rubyvote
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#filter_out and PureCondorcet weren't getting along well for sparse elections
[rubyvote]
/
lib
/
rubyvote
/
election.rb
diff --git
a/lib/rubyvote/election.rb
b/lib/rubyvote/election.rb
index 4499233ebb0bda4e0f305c6a853bbbf7c96ed454..4d51d78b86027014236b0fc581cf070e33bf4486 100644
(file)
--- a/
lib/rubyvote/election.rb
+++ b/
lib/rubyvote/election.rb
@@
-63,12
+63,7
@@
class ElectionVote
end
def filter_out(winner)
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
end
end
Benjamin Mako Hill
||
Want to submit a patch?