From 5044260dcd1d1b51f2e217ca519431ab5a1cf8c2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 29 Nov 2019 16:50:54 +0900 Subject: [PATCH] replace raise method from e2mmap on Scalar class --- lib/matrix.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/matrix.rb b/lib/matrix.rb index 5084de2f1a..8c31643eab 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -1749,7 +1749,7 @@ class Matrix 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 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 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 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