From e81d7189a09155344b3135903300dce450232402 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 11 Sep 2020 18:31:15 +0900 Subject: sync fstring pool fstring pool should be sync with other Ractors. --- bootstraptest/test_ractor.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bootstraptest/test_ractor.rb') diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 141962e913..ab20082711 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -521,4 +521,21 @@ assert_equal 'nil', %q{ r.name.inspect } +### +### Synchronization tests +### + +N = 100_000 + +# fstring pool +assert_equal "#{N}#{N}", %Q{ + N = #{N} + 2.times.map{ + Ractor.new{ + N.times{|i| -(i.to_s)} + } + }.map{|r| r.take}.join +} + end # if !ENV['GITHUB_WORKFLOW'] + -- cgit v1.2.3