Skip to content

Commit

Permalink
Forwardport from ruby/ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Apr 27, 2021
1 parent 387e5b4 commit 200f2a0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/matrix/test_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -820,13 +820,15 @@ def test_adjoint
end

def test_ractor
obj1 = @m1.freeze
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
end if defined?(Ractor)
obj2 = Ractor.new obj1 do |obj|
obj
end.take
assert_same obj1, obj2
RUBY
end

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

0 comments on commit 200f2a0

Please sign in to comment.