1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Prefer String#each_byte when using a block

This commit is contained in:
Nobuyoshi Nakada 2020-06-15 16:20:56 +09:00
parent 8f99bfa26d
commit 2a20c17982
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -1414,7 +1414,7 @@ module MiniTest
end
suites = suites.sort_by do |suite|
crc32 = 0xffffffff
(suite.name + salt).bytes do |data|
(suite.name + salt).each_byte do |data|
crc32 = crc_tbl[(crc32 ^ data) & 0xff] ^ (crc32 >> 8)
end
crc32 ^ 0xffffffff