[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01106] Re: Infinite loop

From: matz@... (Yukihiro Matsumoto)
Date: 2000-01-11 23:45:22 UTC
List: ruby-talk #1106
In message "[ruby-talk:01103] Re: Infinite loop"
    on 00/01/11, Dave Thomas <Dave@thomases.com> writes:

|I strikes be as dangerous having two arrays that happen to have the
|same elements hash to the same value. I could see a lot of bugs
|arising if you then used these arrays as keys in a hash:
|
|  salary[['david', 'thomas']] = 10000
|  salary[['thomas', 'david']] = 90000
|
|Bad news!

Hash would work as long as

  a.hash == b.hash where a.eql?(b)

but hash conflict may cause performance problems.

In This Thread