Skip to content

Commit

Permalink
learners ignore values after learning
Browse files Browse the repository at this point in the history
  • Loading branch information
robhanlon22 committed Dec 14, 2009
1 parent 7510f4c commit a95549d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions learner.rb
Expand Up @@ -17,6 +17,7 @@ def learn
end

def report(value, acceptor)
return if @learned_value
@mutex_me.synchronize do
@learned[acceptor] = value
@learned.inject(Hash.new(0)) do |value_counts, key_value|
Expand Down

0 comments on commit a95549d

Please sign in to comment.