From: transfire@... Date: 2006-07-07T03:46:28+09:00 Subject: Re: Achieving Equality Chris Hulan wrote: > > I'm can't achieve equlity when: > > > > a, b = 1, 1 > > r, w = lambda{ a }, lambda{ b } > > rwd = RWDelegator.new( r, w ) > > rwd == a #=> true > > a == rwd #=> false > > > > Any hope? > > > > T. > > I get a == rwd #=> true ? Ah, it's simplified example of what I'm actually doing. So in this case the integers auto-coerce it seems. Try: a, b = "1", "1" Which is probably a clue that can can be doen via #coerce, but I'm not sure how. T.