#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Tue, 04 Oct 2016 12:43:45 +0200
changeset 20525 d7da56a61fc0
parent 20524 6b3c5f464f78
child 20526 e47455b96760
#REFACTORING by stefan class: ImmutableString added: #beImmutable #beMutable
ImmutableString.st
--- a/ImmutableString.st	Tue Oct 04 12:43:33 2016 +0200
+++ b/ImmutableString.st	Tue Oct 04 12:43:45 2016 +0200
@@ -125,6 +125,18 @@
     "return a writable copy of myself"
 
     ^ self copy changeClassTo:String
+!
+
+beImmutable
+    "that's what I am"
+
+    ^ self
+!
+
+beMutable
+    "you never go back"
+
+    ^ self shouldNotImplement
 ! !
 
 !ImmutableString methodsFor:'copying'!