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.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
index 06bd739931..843714a7bc 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -396,6 +396,13 @@ assert_equal 'ok', %q{
end
}
+# Ractor.main returns main ractor
+assert_equal 'true', %q{
+ Ractor.new{
+ Ractor.main
+ }.take == Ractor.current
+}
+
# a ractor with closed outgoing port should terminate
assert_equal 'ok', %q{
Ractor.new do