diff --git a/spec/ruby/library/matrix/unitary_spec.rb b/spec/ruby/library/matrix/unitary_spec.rb index 9c2a106ea5..b0c23e0e84 100644 --- a/spec/ruby/library/matrix/unitary_spec.rb +++ b/spec/ruby/library/matrix/unitary_spec.rb @@ -5,10 +5,15 @@ describe "Matrix.unitary?" do it "returns false for non unitary matrices" do Matrix[[0, 1], [1, 2]].unitary?.should == false Matrix[[0, Complex(0, 2)], [Complex(0, 2), 0]].unitary?.should == false - Matrix[[0, Complex(0, 1)], [Complex(0, -1), 0]].unitary?.should == false Matrix[[1, 1, 0], [0, 1, 1], [1, 0, 1]].unitary?.should == false end + ruby_version_is '2.8' do # matrix v0.3.0 + it "returns false for non unitary matrix" do + Matrix[[0, Complex(0, 1)], [Complex(0, -1), 0]].unitary?.should == true + end + end + it "returns true for unitary matrices" do Matrix[[0, Complex(0, 1)], [Complex(0, 1), 0]].unitary?.should == true end