From eda7e396ea8b4588eeb4c62e17eae559db12bf6a Mon Sep 17 00:00:00 2001 From: marcandre Date: Wed, 16 Sep 2009 06:02:13 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ lib/matrix.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index eae7d53930..5c81479e40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 16 15:00:21 2009 Marc-Andre Lafortune + + * lib/matrix.rb (Scalar#/): fix bug whereby (any numeric)/(any + Matrix) would raise an error + Wed Sep 16 13:30:20 2009 Marc-Andre Lafortune * lib/matrix.rb: trivial optimizations diff --git a/lib/matrix.rb b/lib/matrix.rb index 632b5fe266..17a0b50718 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -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