ruby-changes:58967
From: Hiroshi <ko1@a...>
Date: Sat, 30 Nov 2019 09:19:57 +0900 (JST)
Subject: [ruby-changes:58967] 2f66c443d7 (master): Support argument for ErrNotRegular
https://git.ruby-lang.org/ruby.git/commit/?id=2f66c443d7 From 2f66c443d79bb3a2d5518dbe58ca86885bc23d5c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Fri, 29 Nov 2019 17:46:13 +0900 Subject: Support argument for ErrNotRegular diff --git a/lib/matrix.rb b/lib/matrix.rb index b4d1be3..cf1d532 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -28,8 +28,12 @@ module ExceptionForMatrix # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L28 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/