зеркало из https://github.com/github/ruby.git
[ruby/did_you_mean] Avoid division for small length2
https://github.com/ruby/did_you_mean/commit/cb518e251a
This commit is contained in:
Родитель
affbc79a10
Коммит
f1682407c5
|
@ -8,8 +8,7 @@ module DidYouMean
|
|||
|
||||
m = 0.0
|
||||
t = 0.0
|
||||
range = length2 / 2 - 1
|
||||
range = 0 if range < 0
|
||||
range = length2 > 3 ? length2 / 2 - 1 : 0
|
||||
flags1 = 0
|
||||
flags2 = 0
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче