ruby-changes:61718
From: Nobuyoshi <ko1@a...>
Date: Mon, 15 Jun 2020 16:25:25 +0900 (JST)
Subject: [ruby-changes:61718] 2a20c17982 (master): Prefer String#each_byte when using a block
https://git.ruby-lang.org/ruby.git/commit/?id=2a20c17982 From 2a20c179822ef72bb0d7329c22cbe1732f5e307b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 15 Jun 2020 16:20:56 +0900 Subject: Prefer String#each_byte when using a block diff --git a/tool/lib/minitest/unit.rb b/tool/lib/minitest/unit.rb index 8c2a970..c325134 100644 --- a/tool/lib/minitest/unit.rb +++ b/tool/lib/minitest/unit.rb @@ -1414,7 +1414,7 @@ module MiniTest https://github.com/ruby/ruby/blob/trunk/tool/lib/minitest/unit.rb#L1414 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/