From: Chris Morris Date: 2009-02-26T02:30:00+09:00 Subject: [ruby-core:22472] [Bug #1210] Array behavior for minus/uniq is not as expected for hash elements Bug #1210: Array behavior for minus/uniq is not as expected for hash elements http://redmine.ruby-lang.org/issues/show/1210 Author: Chris Morris Status: Open, Priority: Normal Category: core, Target version: Ruby 1.8.6 ruby -v: ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-darwin9.3.0] Array#- does not remove an element of type hash (line 8): irb(main):001:0> a = {} => {} irb(main):002:0> b = {} => {} irb(main):003:0> c = [] => [] irb(main):004:0> a == b => true irb(main):005:0> c << a => [{}] irb(main):006:0> c.index(a) => 0 irb(main):007:0> c.index(b) => 0 irb(main):008:0> c - [b] => [{}] irb(main):009:0> c - [a] => [] Array#uniq does not remove an element of type hash (line 7): irb(main):001:0> a = {} => {} irb(main):002:0> b = {} => {} irb(main):003:0> c = [] => [] irb(main):004:0> a == b => true irb(main):005:0> c << a => [{}] irb(main):006:0> c << b => [{}, {}] irb(main):007:0> c.uniq => [{}, {}] ---------------------------------------- http://redmine.ruby-lang.org