From ae19ac5b5ba1e613a788addeb6d4d67fa65f6518 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Thu, 15 Dec 2022 17:53:55 +0900 Subject: fixed encoding table This reduces global lock acquiring for reading. https://bugs.ruby-lang.org/issues/18949 --- bootstraptest/test_ractor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bootstraptest') diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index deffa476e5..4f659374f2 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1474,7 +1474,7 @@ assert_equal "#{N}#{N}", %Q{ } # enc_table -assert_equal "#{N/10}", %Q{ +assert_equal "100", %Q{ Ractor.new do loop do Encoding.find("test-enc-#{rand(5_000)}").inspect @@ -1483,7 +1483,7 @@ assert_equal "#{N/10}", %Q{ end src = Encoding.find("UTF-8") - #{N/10}.times{|i| + 100.times{|i| src.replicate("test-enc-\#{i}") } } -- cgit v1.2.1