mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/matrix.rb (Scalar#/): fix bug whereby (any numeric)/(any Matrix) would raise an error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
88a5c7a81c
commit
eda7e396ea
2 changed files with 6 additions and 1 deletions
|
@ -894,7 +894,7 @@ class Matrix
|
|||
when Vector
|
||||
Scalar.Raise WrongArgType, other.class, "Numeric or Scalar or Matrix"
|
||||
when Matrix
|
||||
self * _M.inverse
|
||||
self * other.inverse
|
||||
else
|
||||
x, y = other.coerce(self)
|
||||
x / y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue