From 29cef5f795043a048a58874d90de0dfe01aa12ea Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 2 Oct 2002 16:45:35 +0000 Subject: use Object#class instead of deprecated Object#type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/matrix.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/matrix.rb') diff --git a/lib/matrix.rb b/lib/matrix.rb index 8e092b0d0b..706252b091 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -688,7 +688,7 @@ class Matrix when Numeric return Scalar.new(other), self else - raise TypeError, "#{type} can't be coerced into #{other.type}" + raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end @@ -751,7 +751,7 @@ class Matrix when Numeric Scalar.new(@value + other) when Vector, Matrix - Scalar.Raise WrongArgType, other.type, "Numeric or Scalar" + Scalar.Raise WrongArgType, other.class, "Numeric or Scalar" when Scalar Scalar.new(@value + other.value) else @@ -765,7 +765,7 @@ class Matrix when Numeric Scalar.new(@value - other) when Vector, Matrix - Scalar.Raise WrongArgType, other.type, "Numeric or Scalar" + Scalar.Raise WrongArgType, other.class, "Numeric or Scalar" when Scalar Scalar.new(@value - other.value) else @@ -791,7 +791,7 @@ class Matrix when Numeric Scalar.new(@value / other) when Vector - Scalar.Raise WrongArgType, other.type, "Numeric or Scalar or Matrix" + Scalar.Raise WrongArgType, other.class, "Numeric or Scalar or Matrix" when Matrix self * _M.inverse else @@ -805,7 +805,7 @@ class Matrix when Numeric Scalar.new(@value ** other) when Vector - Scalar.Raise WrongArgType, other.type, "Numeric or Scalar or Matrix" + Scalar.Raise WrongArgType, other.class, "Numeric or Scalar or Matrix" when Matrix other.powered_by(self) else @@ -1007,7 +1007,7 @@ class Vector when Numeric return Scalar.new(other), self else - raise TypeError, "#{type} can't be coerced into #{other.type}" + raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end -- cgit v1.2.3