summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2020-10-25 16:44:53 -0400
committerMarc-Andre Lafortune <github@marc-andre.ca>2020-10-25 16:44:59 -0400
commit5e6f9fd83a6ede9b43c4e5887c6ac7dd22c4eb7b (patch)
tree3bc513d63502fb835d6eb0bf13190d1881c14eaa /bootstraptest
parentee54075a94a33101795f235fb7ec217bc8bb6549 (diff)
Tweak a few Ractor tests that were missing comments [ci skip]
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_ractor.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
index 61dfc40adc..782d4fab1c 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -81,6 +81,7 @@ assert_equal 'ok', %q{
r.take
}
+# Pass multiple arguments to Ractor.new
assert_equal 'ok', %q{
# ping-pong with two args
r = Ractor.new 'ping', 'pong' do |msg, msg2|
@@ -117,6 +118,7 @@ assert_equal 'ok', %q{
'ok' if r == r1 and obj == 'r1'
}
+# Ractor.select from two ractors.
assert_equal '["r1", "r2"]', %q{
# select 2
r1 = Ractor.new{'r1'}
@@ -131,6 +133,7 @@ assert_equal '["r1", "r2"]', %q{
as.sort #=> ["r1", "r2"]
}
+# Ractor.select from multiple ractors.
assert_equal 'true', %q{
def test n
rs = (1..n).map do |i|
@@ -178,6 +181,7 @@ assert_equal 'ok', %q{
end
}
+# Raise Ractor::ClosedError when try to send into a terminated ractor
assert_equal 'ok', %q{
r = Ractor.new do
end