Skip to content

Commit

Permalink
[ruby/matrix] Add Ractor test
Browse files Browse the repository at this point in the history
This reverts commit cacdf26.
  • Loading branch information
marcandre committed Dec 19, 2020
1 parent 70f2023 commit 67e062b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/matrix/test_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,14 @@ def test_adjoint
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

0 comments on commit 67e062b

Please sign in to comment.