From 68ed743d99b3a94ce165694adaad05c72311f6f2 Mon Sep 17 00:00:00 2001 From: keiju Date: Sun, 9 Dec 2001 14:11:30 +0000 Subject: [PATCH] * matrix.rb: Vector#* bug. reported from Massimiliano Mirra . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/matrix.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0de0c95ba3..64664b74c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 9 23:00:54 2001 Keiju Ishitsuka + * matrix.rb: Vector#* bug. reported from Massimiliano Mirra + . + Sun Dec 9 22:15:59 2001 Nobuyoshi Nakada * enum.c (enum_sort_by): should replace with last elements. diff --git a/lib/matrix.rb b/lib/matrix.rb index fa454e338e..8e092b0d0b 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -902,9 +902,9 @@ class Vector els = @elements.collect{|e| e * x} Vector.elements(els, false) when Matrix - self.covector * x + Matrix.column_vector(self) * x else - s, x = X.coerce(self) + s, x = x.coerce(self) s * x end end