summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-29 17:46:13 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-11-30 08:00:40 +0900
commit2f66c443d79bb3a2d5518dbe58ca86885bc23d5c (patch)
tree6f6c169568e04d37765c4fd26b0c34c949d6d455
parent0c59bfae0a3a9f5a3420a1eac42753480d8d95f7 (diff)
Support argument for ErrNotRegular
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2699
-rw-r--r--lib/matrix.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb
index b4d1be33bb..cf1d532693 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -28,8 +28,12 @@ module ExceptionForMatrix # :nodoc:
end
class ErrNotRegular < StandardError
- def initialize
- super("Not Regular Matrix")
+ def initialize(val = nil)
+ if val
+ super(val)
+ else
+ super("Not Regular Matrix")
+ end
end
end