ImmutableString.st
author Stefan Vogel <sv@exept.de>
Fri, 31 May 2013 14:50:39 +0200
changeset 15342 d89884677c76
parent 14386 27b494f48340
child 16400 6c38fd2957bc
child 18011 deb0c3355881
permissions -rw-r--r--
class: ExternalStream class definition changed: #nextAvailableBytes:into:startingAt: linux: __READAVAILBYTES_OBJ__ didn't set O_NONBLOCK flag
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1998 by eXept Software AG
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
     3
	      All Rights Reserved
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    12
"{ Package: 'stx:libbasic' }"
8807
606a4ec5b693 #notifyStoreError raise error proceedable.
Stefan Vogel <sv@exept.de>
parents: 3714
diff changeset
    13
606a4ec5b693 #notifyStoreError raise error proceedable.
Stefan Vogel <sv@exept.de>
parents: 3714
diff changeset
    14
String variableByteSubclass:#ImmutableString
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'System-Compiler-Support'
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!ImmutableString class methodsFor:'documentation'!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
copyright
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
 COPYRIGHT (c) 1998 by eXept Software AG
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    26
	      All Rights Reserved
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 hereby transferred.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    By default, string literals in smalltalk are mutable objects. That
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    may lead to some subtle (and hard to find errors), if some method passes
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    a string constant as argument to someone else, who changes the
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    43
    string using at:put: like messages. Since the string object is kept in
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    the first methods literals, the string constant has now been changed without
12464
c0a970ba9175 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 12457
diff changeset
    45
    having the method's sourcecode reflect this. Thus, the method will
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    behave differently from what its source may make you think.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    To help finding this kind of 'feature/bug', the compiler can be
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    configured to create instances of this ImmutableString instead of Strings
12464
c0a970ba9175 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 12457
diff changeset
    50
    for literals. Instances of ImmutableString catch storing accesses and
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    enter the debugger. Although useful, this feature is disabled by default
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    52
    for compatibility to other smalltalk implementations.
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    (Also, if turned on, this makes inspecting string literals entered in
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
     a workspace somewhat strange: you cannot modify it any longer).
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    Turn the ImmutableString feature on by setting the Parsers class variable
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    'StringsAreImmutable' to true or use the new launchers settings menu.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
12471
c6260f85e725 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 12464
diff changeset
    59
c6260f85e725 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 12464
diff changeset
    60
    ATTENTION:
14222
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    61
        there may be still code around which checks for explicit class being String
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    62
        (both in Smalltalk and in primitive code). All code like foo 'class == String'
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    63
        or '__isString()' will not work with ImmutableStrings. Use '__isStringLike()' instead.
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    64
        A somewhat better approach would be to either add a flag to the object (mutability)
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    65
        and check this dynamically (expensive) or to place immutable objects into a readonly
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    66
        memory segment (the good solution). We will eventually implement the second in the future...
12471
c6260f85e725 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 12464
diff changeset
    67
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    [see also:]
14222
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    69
        ImmutableArray
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    70
        Parser Scanner
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    [author:]
14222
876ba773f5d2 changed: #documentation
Stefan Vogel <sv@exept.de>
parents: 14115
diff changeset
    73
        Claus Gittinger
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
! !
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
!ImmutableString methodsFor:'accessing'!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    79
at:index put:value
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    "Trigger an error if an immutable string is stored into.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
     The store will be performed (for compatibility reasons) if you continue
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
     in the debugger."
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    83
12491
d74b78dd478a Raise NoModificationError
Stefan Vogel <sv@exept.de>
parents: 12471
diff changeset
    84
    self noModificationError.
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
    ^ super at:index put:value
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    "Created: / 3.8.1998 / 14:45:14 / cg"
12457
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    88
!
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    89
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    90
basicAt:index put:value
12457
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    91
    "Trigger an error if an immutable string is stored into.
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    92
     The store will be performed (for compatibility reasons) if you continue
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    93
     in the debugger."
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
    94
12491
d74b78dd478a Raise NoModificationError
Stefan Vogel <sv@exept.de>
parents: 12471
diff changeset
    95
    self noModificationError.
12457
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    96
    ^ super basicAt:index put:value
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    97
! !
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    98
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
    99
!ImmutableString methodsFor:'converting'!
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   100
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   101
asImmutableString
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   102
    ^ self
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
! !
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
!ImmutableString methodsFor:'copying'!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
postCopy
12457
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   108
    "when copied, make me a real (mutable) String"
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   109
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   110
    self changeClassTo:String.
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   111
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   112
    "Created: / 3.8.1998 / 14:46:45 / cg"
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   113
!
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   114
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   115
postDeepCopy
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    "when copied, make it me a real (mutable) String"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    self changeClassTo:String.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
12457
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   120
    "
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   121
     'foobar' asImmutableString copy          class
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   122
     'foobar' asImmutableString shallowCopy   class
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   123
     'foobar' asImmutableString deepCopy      class
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   124
    "
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
shallowCopy
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    "when copying, return a real (mutable) String"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    |sz|
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
    sz := self size.
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
    ^ (String new:sz) replaceFrom:1 to:sz with:self startingAt:1
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
14115
8599762e8a45 comment/format in: #shallowCopy
Stefan Vogel <sv@exept.de>
parents: 14025
diff changeset
   135
    "
8599762e8a45 comment/format in: #shallowCopy
Stefan Vogel <sv@exept.de>
parents: 14025
diff changeset
   136
     'hello world' asImmutableString shallowCopy
8599762e8a45 comment/format in: #shallowCopy
Stefan Vogel <sv@exept.de>
parents: 14025
diff changeset
   137
    "
8599762e8a45 comment/format in: #shallowCopy
Stefan Vogel <sv@exept.de>
parents: 14025
diff changeset
   138
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
    "Created: / 3.8.1998 / 14:47:00 / cg"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
! !
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
!ImmutableString methodsFor:'private'!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
species
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    "Copies should be mutable"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
    ^ String
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
    "Created: / 3.8.1998 / 14:47:58 / cg"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
! !
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
14386
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   152
!ImmutableString methodsFor:'queries'!
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   153
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   154
isImmutable
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   155
    ^ true
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   156
! !
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   157
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
!ImmutableString methodsFor:'specials'!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
   160
become:anotherObject
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    "trigger an error if I should become something else
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
     (this would be an even more tricky manipulation)"
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
   163
12491
d74b78dd478a Raise NoModificationError
Stefan Vogel <sv@exept.de>
parents: 12471
diff changeset
   164
    self noModificationError.
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
    ^ super become:anotherObject
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    "Created: / 3.8.1998 / 14:48:29 / cg"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
becomeNil
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
    "trigger an error if I should become nil
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
     (this would be an even more tricky manipulation)"
12538
e6bf8c42e1d4 Moved to libbasic from libcomp - change package name
Stefan Vogel <sv@exept.de>
parents: 12491
diff changeset
   173
12491
d74b78dd478a Raise NoModificationError
Stefan Vogel <sv@exept.de>
parents: 12471
diff changeset
   174
    self noModificationError.
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    ^ super becomeNil
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    "Created: / 3.8.1998 / 14:48:37 / cg"
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
! !
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
!ImmutableString class methodsFor:'documentation'!
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
version
14386
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   183
    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableString.st,v 1.13 2012-10-16 15:11:35 cg Exp $'
12457
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   184
!
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   185
7094a6561516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9412
diff changeset
   186
version_CVS
14386
27b494f48340 isImmutable
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
   187
    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableString.st,v 1.13 2012-10-16 15:11:35 cg Exp $'
3714
62524619bfb7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
! !