Bugs: Browse | Submit New | Admin

[#3506] Set containing duplicates

Date:
2006-02-08 22:52
Priority:
3
Submitted By:
Stefan Rusterholz (rstefan)
Assigned To:
Akinori MUSHA (knu)
Category:
Misc / Other Standard Library
State:
Open
Platform:
 
Summary:
Set containing duplicates

Detailed description
If an object added to a set becomes modified and added again it will be in the set twice.
A fix to this would be to add "@hash.rehash" in "def add(o)" and "def merge(enum)". Though
this might minder the speed advantage of set.
OTOH Set becomes quite useless if it is impossible to add without checking first if the element already contained.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2006-11-07 18:18
Sender: Akinori MUSHA

Would you give me some test cases so I can see what you expect
from what?
Thanks.

Attached Files:

Name Description Download
set.rb Sample case for unexpected Set-behaviour Download

Changes:

Field Old Value Date By
category_idLanguage / Runtime / Core Libraries2006-11-07 18:19knu
assigned_tonone2006-11-07 18:19knu
File Added467: set.rb2006-02-09 01:59rstefan