Project

General

Profile

Actions

Bug #5146

closed

Bug in Set#== on ruby 1.9.3-preview1

Added by blambeau (Bernard LAMBEAU) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
r30514
Backport:
[ruby-core:38650]

Description

Hi!

Sorry for reporting this bug here, but I can't log into redmine even after
having
requested a new password...

Set#== seems buggy in ruby 1.9.3, as illustrated by the following scenario.
I can't reproduce the bug without using Hash#delete to get another empty
hash
than "{ }".

blambeau@kali:~/Temp$ cat test.rb

require 'set'
RUBY_VERSION
tuple = {:hello => "world"}
empty = tuple.dup
empty.delete(:hello)
puts empty == {}
puts Set.new([{}]) == Set.new([empty])

blambeau@kali:~/Temp$ ruby --version
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

blambeau@kali:~/Temp$ ruby test.rb
true
true

[...]

blambeau@kali:~/Temp$ ruby --version
ruby 1.9.3dev (2011-07-31 revision 32789) [i686-linux]

blambeau@kali:~/Temp$ ruby test.rb
true
false

Actions

Also available in: Atom PDF

Like0
Like0Like0