diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-09-11 18:31:15 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-09-15 00:04:59 +0900 |
commit | e81d7189a09155344b3135903300dce450232402 (patch) | |
tree | 48922bdeb367549d811e48d32e84048aef6e66d8 /bootstraptest | |
parent | 74ddac1c822697b442646f433d60e2c099db3c3b (diff) | |
download | ruby-e81d7189a09155344b3135903300dce450232402.tar.gz |
sync fstring pool
fstring pool should be sync with other Ractors.
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_ractor.rb | 17 |
1 files changed, 17 insertions, 0 deletions
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'] + |