diff options
author | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/matrix/shared | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/matrix/shared')
-rw-r--r-- | spec/ruby/library/matrix/shared/determinant.rb | 4 | ||||
-rw-r--r-- | spec/ruby/library/matrix/shared/inverse.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/matrix/shared/trace.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/matrix/shared/determinant.rb b/spec/ruby/library/matrix/shared/determinant.rb index 47a58c62a6..9e0528c24b 100644 --- a/spec/ruby/library/matrix/shared/determinant.rb +++ b/spec/ruby/library/matrix/shared/determinant.rb @@ -27,11 +27,11 @@ describe :determinant, shared: true do end it "raises an error for rectangular matrices" do - lambda { + -> { Matrix[[1], [2], [3]].send(@method) }.should raise_error(Matrix::ErrDimensionMismatch) - lambda { + -> { Matrix.empty(3,0).send(@method) }.should raise_error(Matrix::ErrDimensionMismatch) end diff --git a/spec/ruby/library/matrix/shared/inverse.rb b/spec/ruby/library/matrix/shared/inverse.rb index e1e5ae5758..c8a6b90da5 100644 --- a/spec/ruby/library/matrix/shared/inverse.rb +++ b/spec/ruby/library/matrix/shared/inverse.rb @@ -25,7 +25,7 @@ describe :inverse, shared: true do end it "raises a ErrDimensionMismatch if the Matrix is not square" do - lambda{ + ->{ Matrix[ [1,2,3], [1,2,3] ].send(@method) }.should raise_error(Matrix::ErrDimensionMismatch) end diff --git a/spec/ruby/library/matrix/shared/trace.rb b/spec/ruby/library/matrix/shared/trace.rb index 2a42839f5d..57b89863f8 100644 --- a/spec/ruby/library/matrix/shared/trace.rb +++ b/spec/ruby/library/matrix/shared/trace.rb @@ -6,7 +6,7 @@ describe :trace, shared: true do end it "returns the sum of diagonal elements in a rectangular Matrix" do - lambda{ Matrix[[1,2,3], [4,5,6]].trace}.should raise_error(Matrix::ErrDimensionMismatch) + ->{ Matrix[[1,2,3], [4,5,6]].trace}.should raise_error(Matrix::ErrDimensionMismatch) end end |