diff options
author | Hiroshi SHIBATA <[email protected]> | 2019-11-29 16:50:54 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <[email protected]> | 2019-11-30 08:00:40 +0900 |
commit | 5044260dcd1d1b51f2e217ca519431ab5a1cf8c2 (patch) | |
tree | 97a0e9c3c9889badfaad69c5e49b53ecf6154327 /lib/matrix.rb | |
parent | 9b950310be874753935a6ef4e8f94b3686f70540 (diff) |
replace raise method from e2mmap on Scalar class
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
Diffstat (limited to 'lib/matrix.rb')
-rw-r--r-- | lib/matrix.rb | 10 |
1 files 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 |