diff options
author | Hiroshi SHIBATA <[email protected]> | 2019-11-29 17:46:13 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <[email protected]> | 2019-11-30 08:00:40 +0900 |
commit | 2f66c443d79bb3a2d5518dbe58ca86885bc23d5c (patch) | |
tree | 6f6c169568e04d37765c4fd26b0c34c949d6d455 /lib/matrix.rb | |
parent | 0c59bfae0a3a9f5a3420a1eac42753480d8d95f7 (diff) |
Support argument for ErrNotRegular
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
Diffstat (limited to 'lib/matrix.rb')
-rw-r--r-- | lib/matrix.rb | 8 |
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 |