diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-04 07:15:17 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-04 07:15:17 +0000 |
commit | ec43854aa6be4a295ec76334843748a0ef0059b4 (patch) | |
tree | e75ecf31c5f5452119c5efb70a560c3b51934efe /lib/set.rb | |
parent | 64901cd69beb7b965b7d9e685b5fcdb835362c50 (diff) | |
download | ruby-ec43854aa6be4a295ec76334843748a0ef0059b4.tar.gz |
- ==(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
Diffstat (limited to 'lib/set.rb')
-rw-r--r-- | lib/set.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/set.rb b/lib/set.rb index 1df42e08d2..1dcfbfcdef 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -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 |