From 117b4df7c78ccb9437e2f14ecd2cd6f51cb757f3 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 6 Feb 2003 09:49:12 +0000 Subject: * lib/complex.rb (Complex#==): should not raise error by type mismatch. * lib/rational.rb (Rational#==): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/complex.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/complex.rb') diff --git a/lib/complex.rb b/lib/complex.rb index ccf357c7a2..98af310d3e 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -265,8 +265,7 @@ class Complex < Numeric elsif Complex.generic?(other) @real == other and @image == 0 else - x , y = other.coerce(self) - x == y + other == self end end -- cgit v1.2.3