зеркало из https://github.com/github/ruby.git
Fix message of ExceptionForMatrix::ErrOperationNotDefined
``` % RBENV_VERSION=2.6.5 ruby -r matrix -e 'Vector[1]*Vector[2] rescue p($!)' #<ExceptionForMatrix::ErrOperationNotDefined: Operation(*) can't be defined: Vector op Vector> % RBENV_VERSION=2.7.0 ruby -r matrix -e 'Vector[1]*Vector[2] rescue p($!)' #<ExceptionForMatrix::ErrOperationNotDefined: Operation(*) can\'t be defined: Vector op Vector> % RBENV_VERSION=master ruby -r matrix -e 'Vector[1]*Vector[2] rescue p($!)' #<ExceptionForMatrix::ErrOperationNotDefined: Operation(*) can't be defined: Vector op Vector> ```
This commit is contained in:
Родитель
a28c166f78
Коммит
e077a910b6
|
@ -38,7 +38,7 @@ module ExceptionForMatrix # :nodoc:
|
|||
class ErrOperationNotDefined < StandardError
|
||||
def initialize(vals)
|
||||
if vals.is_a?(Array)
|
||||
super("Operation(#{vals[0]}) can\\'t be defined: #{vals[1]} op #{vals[2]}")
|
||||
super("Operation(#{vals[0]}) can't be defined: #{vals[1]} op #{vals[2]}")
|
||||
else
|
||||
super(vals)
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче