From: Daniel Berger Date: 2008-06-25T05:43:36+09:00 Subject: Problem with Array#delete ? Hi all, In messing around with Array#delete I think I've uncovered a problem. Consider this example: class Foo def ==(other) $array.clear false end end arr = [1, 2, 3] arr << Foo.new Arr << 'b' $array = arr arr.delete('a') p arr # => [] p $array # => [] That's what I would expect. It did the comparison, and called the Foo#== method, which in turn cleared the receiver. But if you do this instead: arr.delete(1) You end up with: [nil, nil, #] [nil, nil, #] What's happening? Thanks, Dan