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

ruby-changes:58965

From: Hiroshi <ko1@a...>
Date: Sat, 30 Nov 2019 08:01:01 +0900 (JST)
Subject: [ruby-changes:58965] 5044260dcd (master): replace raise method from e2mmap on Scalar class

https://git.ruby-lang.org/ruby.git/commit/?id=5044260dcd

From 5044260dcd1d1b51f2e217ca519431ab5a1cf8c2 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Fri, 29 Nov 2019 16:50:54 +0900
Subject: replace raise method from e2mmap on Scalar class


diff --git a/lib/matrix.rb b/lib/matrix.rb
index 5084de2..8c31643 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -1749,7 +1749,7 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L1749
       when Numeric
         Scalar.new(@value + other)
       when Vector, Matrix
-        Scalar.Raise ErrOperationNotDefined, "+", @value.class, other.class
+        raise ErrOperationNotDefined, ["+", @value.class, other.class]
       else
         apply_through_coercion(other, __method__)
       end
@@ -1760,7 +1760,7 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L1760
       when Numeric
         Scalar.new(@value - other)
       when Vector, Matrix
-        Scalar.Raise ErrOperationNotDefined, "-", @value.class, other.class
+        raise ErrOperationNotDefined, ["-", @value.class, other.class]
       else
         apply_through_coercion(other, __method__)
       end
@@ -1782,7 +1782,7 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L1782
       when Numeric
         Scalar.new(@value / other)
       when Vector
-        Scalar.Raise ErrOperationNotDefined, "/", @value.class, other.class
+        raise ErrOperationNotDefined, ["/", @value.class, other.class]
       when Matrix
         self * other.inverse
       else
@@ -1795,10 +1795,10 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L1795
       when Numeric
         Scalar.new(@value ** other)
       when Vector
-        Scalar.Raise ErrOperationNotDefined, "**", @value.class, other.class
+        raise ErrOperationNotDefined, ["**", @value.class, other.class]
       when Matrix
         #other.powered_by(self)
-        Scalar.Raise ErrOperationNotImplemented, "**", @value.class, other.class
+        raise ErrOperationNotImplemented, ["**", @value.class, other.class]
       else
         apply_through_coercion(other, __method__)
       end
-- 
cgit v0.10.2


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

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