1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
Kazuhiro NISHIYAMA 2020-02-09 13:39:24 +09:00
parent a28c166f78
commit e077a910b6
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -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