From 5e6f9fd83a6ede9b43c4e5887c6ac7dd22c4eb7b Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Sun, 25 Oct 2020 16:44:53 -0400 Subject: [PATCH] Tweak a few Ractor tests that were missing comments [ci skip] --- bootstraptest/test_ractor.rb | 4 ++++ 1 file changed, 4 insertions(+) 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