diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
| commit | 8e011248465bae7b06203bc2c260432454bcac21 (patch) | |
| tree | 6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/matrix.rb | |
| parent | 50c355b12eac3ffa982fc60e96a8a272b6b4dff9 (diff) | |
| download | ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.gz ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.xz ruby-8e011248465bae7b06203bc2c260432454bcac21.zip | |
use Object#class instead of deprecated Object#type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/matrix.rb')
| -rw-r--r-- | lib/matrix.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb index 8e092b0d0..706252b09 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 |
