summaryrefslogtreecommitdiff
path: root/bootstraptest/test_ractor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_ractor.rb')
-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 05139e2081..eaa265fcfa 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -780,6 +780,7 @@ assert_equal "#{N}#{N}", %Q{
}.map{|r| r.take}.join
}
+# enc_table
assert_equal "#{N/10}", %Q{
Ractor.new do
loop do
@@ -794,4 +795,20 @@ assert_equal "#{N/10}", %Q{
}
}
+# Generic ivtbl
+n = N/2
+assert_equal "#{n}#{n}", %Q{
+ 2.times.map{
+ Ractor.new do
+ #{n}.times do
+ obj = ''
+ obj.instance_variable_set("@a", 1)
+ obj.instance_variable_set("@b", 1)
+ obj.instance_variable_set("@c", 1)
+ obj.instance_variable_defined?("@a")
+ end
+ end
+ }.map{|r| r.take}.join
+}
+
end # if !ENV['GITHUB_WORKFLOW']