summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-09-11 18:31:15 +0900
committerKoichi Sasada <ko1@atdot.net>2020-09-15 00:04:59 +0900
commite81d7189a09155344b3135903300dce450232402 (patch)
tree48922bdeb367549d811e48d32e84048aef6e66d8 /bootstraptest
parent74ddac1c822697b442646f433d60e2c099db3c3b (diff)
sync fstring pool
fstring pool should be sync with other Ractors.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3534
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_ractor.rb17
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']
+