Ruby Forum IronRuby > MutableString == operator

Posted by Peter Bacon Darwin (Guest)
on 07.05.2008 16:01
(Received via mailing list)
I just noticed that MutableString does not implement the == operator 
(and of
course != operator).



This could be confusing because CLR string does implement this operator 
to
be a value comparison, rather than the default reference comparison of
System.Object.



I imagine most people would expect MutableString to do the same.  What 
is
the consensus view on this?  Is there some reason I am not getting for 
not
introducing this operator?



I am now going to go through all the code I have written that uses
MutableStrings to make sure I am using Equals rather than ==.



Pete
Posted by John Lam (IRONRUBY) (Guest)
on 07.05.2008 16:38
(Received via mailing list)
Peter Bacon Darwin:

> I just noticed that MutableString does not implement the == operator
> (and of course != operator).

This was an oversight ... but since Tomas is rewriting MutableString 
this week to support byte arrays and char arrays, let's hold off on 
these changes until later this week.

Thanks,
-John