From: "marcandre (Marc-Andre Lafortune)" Date: 2012-05-07T07:24:27+09:00 Subject: [ruby-core:44914] [ruby-trunk - Bug #6408] DelegateClass#eql? and <=> don't work as expected Issue #6408 has been updated by marcandre (Marc-Andre Lafortune). marcandre (Marc-Andre Lafortune) wrote: > Hi, > > In your patch, for both `if obj.equal? self`, shouldn't it be `if obj.is_a? Delegator`? Or if you did mean `obj.equal? self`, then you can return true / 0, at least that what != and == are doing. Better not delegate to NaN :-) ---------------------------------------- Bug #6408: DelegateClass#eql? and <=> don't work as expected https://bugs.ruby-lang.org/issues/6408#change-26499 Author: tenderlovemaking (Aaron Patterson) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0dev (2012-05-06 trunk 35548) [x86_64-darwin11.3.0] It seems these two methods aren't delegating to the delegate object when compared against itself. I've attached a patch with tests and a fix. It seems nobody is the maintainer for delegate.rb (according to the wiki), so if nobody objects, I will apply this patch. -- http://bugs.ruby-lang.org/