Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 200f2a0

Browse files
committedApr 27, 2021
Forwardport from ruby/ruby
* ruby/ruby@cacdf26 * ruby/ruby@67e062b
1 parent 387e5b4 commit 200f2a0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎test/matrix/test_matrix.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -820,13 +820,15 @@ def test_adjoint
820820
end
821821

822822
def test_ractor
823-
obj1 = @m1.freeze
823+
assert_ractor(<<~RUBY, require: 'matrix')
824+
obj1 = Matrix[[1, 2], [3, 4]].freeze
824825
825-
obj2 = Ractor.new obj1 do |obj|
826-
obj
827-
end.take
828-
assert_same obj1, obj2
829-
end if defined?(Ractor)
826+
obj2 = Ractor.new obj1 do |obj|
827+
obj
828+
end.take
829+
assert_same obj1, obj2
830+
RUBY
831+
end
830832

831833
def test_rotate_with_symbol
832834
assert_equal(Matrix[[4, 1], [5, 2], [6, 3]], @m1.rotate_entries)

0 commit comments

Comments
 (0)
Please sign in to comment.