ruby-changes:63432
From: Marc-Andre <ko1@a...>
Date: Mon, 26 Oct 2020 05:45:35 +0900 (JST)
Subject: [ruby-changes:63432] 5e6f9fd83a (master): Tweak a few Ractor tests that were missing comments [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=5e6f9fd83a From 5e6f9fd83a6ede9b43c4e5887c6ac7dd22c4eb7b Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune <github@m...> Date: Sun, 25 Oct 2020 16:44:53 -0400 Subject: Tweak a few Ractor tests that were missing comments [ci skip] diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 61dfc40..782d4fa 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -81,6 +81,7 @@ assert_equal 'ok', %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_ractor.rb#L81 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{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_ractor.rb#L118 '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{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_ractor.rb#L133 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{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_ractor.rb#L181 end } +# Raise Ractor::ClosedError when try to send into a terminated ractor assert_equal 'ok', %q{ r = Ractor.new do end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/