ruby-changes:66086
From: Hiroshi <ko1@a...>
Date: Thu, 6 May 2021 19:02:35 +0900 (JST)
Subject: [ruby-changes:66086] f2d6fa16e1 (master): Use assert_ractor for separating test processes
https://git.ruby-lang.org/ruby.git/commit/?id=f2d6fa16e1 From f2d6fa16e116cbb624ccc8df4cbc57422e236d46 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Thu, 6 May 2021 17:19:41 +0900 Subject: Use assert_ractor for separating test processes --- test/test_prime.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/test_prime.rb b/test/test_prime.rb index 8e8203e..a0e8af5 100644 --- a/test/test_prime.rb +++ b/test/test_prime.rb @@ -262,13 +262,12 @@ class TestPrime < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_prime.rb#L262 assert_equal 861, (100_000..110_000).count(&:prime?) end -=begin - # now Ractor should not use in test-all process def test_prime_in_ractor - # Test usage of private constant... - assert_equal false, Ractor.new { ((2**13-1) * (2**17-1)).prime? }.take + assert_ractor(<<~RUBY, require: 'prime') + # Test usage of private constant... + assert_equal false, Ractor.new { ((2**13-1) * (2**17-1)).prime? }.take + RUBY end if defined?(Ractor) -=end end def test_eratosthenes_works_fine_after_timeout -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/