Skip to content

Commit

Permalink
Merge pull request #1 from undeath/master
Browse files Browse the repository at this point in the history
crash on using --top in BaseWordFrequencyAgent
  • Loading branch information
T. Alexander Lystad committed Feb 24, 2012
2 parents 6b1d6fb + dd7fe9c commit 3496afc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion passpal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def analyze(word)
end
def report
output = []
while (@words.length > 0 && output.length < $top)
while (@words.length > 0 && output.length < $top.to_i)
max_value = 0
max_key = nil
@words.each do |key, value|
Expand Down

0 comments on commit 3496afc

Please sign in to comment.