# MutableString == operator

**URL:** <https://www.ruby-forum.com/t/mutablestring-operator/136938>\
**Category:** IronRuby\
**Created:** [May 7, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/mutablestring-operator/136938 "2008-05-07T16:01:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![editkid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/977dab/32.png) [@editkid](https://www.ruby-forum.com/u/editkid)\
**Post date:** [May 7, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/mutablestring-operator/136938/1 "2008-05-07T16:01:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![editkid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/977dab/32.png) [@editkid](https://www.ruby-forum.com/u/editkid)\
**Post date:** [May 7, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/mutablestring-operator/136938/2 "2008-05-07T16:38:20Z")

</div>

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
