mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
9a4c662771
commit
117b4df7c7
3 changed files with 29 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue