MutableString == operator

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

Peter Bacon D.:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs