Skip to content
Browse files

Rewrite for loop in UTF8Prober as a Ruby-like loop

  • Loading branch information...
1 parent 1194c08 commit 885303d2536479370e74c3302717bcf3d0985049 @CraigCottingham committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/UTF8Prober.rb
View
2 lib/UTF8Prober.rb
@@ -81,7 +81,7 @@ def feed(aBuf)
def get_confidence
unlike = 0.99
if @_mNumOfMBChar < 6
- for i in 0...@_mNumOfMBChar
+ @_mNumOfMBChar.times do
unlike = unlike * ONE_CHAR_PROB
end
return 1.0 - unlike

0 comments on commit 885303d

Please sign in to comment.
Something went wrong with that request. Please try again.