[前][次][番号順一覧][スレッド一覧]

ruby-changes:60961

From: Takashi <ko1@a...>
Date: Fri, 1 May 2020 16:45:48 +0900 (JST)
Subject: [ruby-changes:60961] 76507bfc3d (master): Fix matrix spec for 7d360efe92d2db11a4e51820ed2f52de36b3257f

https://git.ruby-lang.org/ruby.git/commit/?id=76507bfc3d

From 76507bfc3d06984b02e3124cd6557c81af2171cd Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Fri, 1 May 2020 00:45:17 -0700
Subject: Fix matrix spec for 7d360efe92d2db11a4e51820ed2f52de36b3257f


diff --git a/spec/ruby/library/matrix/unitary_spec.rb b/spec/ruby/library/matrix/unitary_spec.rb
index 9c2a106..b0c23e0 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/matrix/unitary_spec.rb#L5
   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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]