1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

- ==(o) should be aware of all the Set variant instances, not just

those of its subclasses.

- Fix eql?().

Submitted by: "Christoph" <chr_news@gmx.net>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2002-09-04 07:15:17 +00:00
parent 64901cd69b
commit ec43854aa6

View file

@ -335,7 +335,7 @@ class Set
def ==(set)
equal?(set) and return true
set.is_a?(type) && size == set.size or return false
set.is_a?(Set) && size == set.size or return false
set.each { |o| include?(o) or return false }
@ -347,7 +347,7 @@ class Set
end
def eql?(o)
@hash == o.hash
@hash.hash == o.hash
end
def classify