ruby-changes:64361
From: Marc-Andre <ko1@a...>
Date: Sun, 20 Dec 2020 07:13:29 +0900 (JST)
Subject: [ruby-changes:64361] 67e062b523 (master): [ruby/matrix] Add Ractor test
https://git.ruby-lang.org/ruby.git/commit/?id=67e062b523 From 67e062b523e1a1bdf597a500027c916c16cd07a1 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune <github@m...> Date: Sat, 19 Dec 2020 12:17:47 -0500 Subject: [ruby/matrix] Add Ractor test This reverts commit cacdf2681dcc7c431973f33a18979b10566ec2f9. diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb index 873e118..04e8a5b 100644 --- a/test/matrix/test_matrix.rb +++ b/test/matrix/test_matrix.rb @@ -819,14 +819,14 @@ class TestMatrix < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/matrix/test_matrix.rb#L819 assert_equal(Matrix.empty(0,2), @e1.adjoint) end -=begin def test_ractor - obj1 = @m1.freeze - - obj2 = Ractor.new obj1 do |obj| - obj - end.take - assert_same obj1, obj2 - end if defined?(Ractor) -=end + assert_ractor(<<~RUBY, require: 'matrix') + obj1 = Matrix[[1, 2], [3, 4]].freeze + + obj2 = Ractor.new obj1 do |obj| + obj + end.take + assert_same obj1, obj2 + RUBY + end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/