--- a/List.st Thu Dec 06 22:51:49 2007 +0100
+++ b/List.st Fri Jan 18 20:40:51 2008 +0100
@@ -106,28 +106,11 @@
!
add:anObject beforeIndex:index
- "add the argument, anObject to the end of the collection
- Return the argument, anObject."
-
- |idx physicalIndex|
+ "add the argument, anObject to the end of the collection.
+ Return the receiver (sigh - ST-80 compatibility)."
- physicalIndex := index + firstIndex - 1.
- physicalIndex > lastIndex ifTrue:[
- physicalIndex == (lastIndex+1) ifTrue:[
- self addLast:anObject.
- ^ self
- ].
- ^ self subscriptBoundsError:index
- ].
-
- idx := self makeRoomAtIndex:physicalIndex.
- "/ notice: the above may change firstIndex
- contentsArray basicAt:idx put:anObject.
-
+ super add:anObject beforeIndex:index.
dependents notNil ifTrue:[self changed:#insert: with:index].
- ^ anObject
-
- "Modified: / 2.2.1998 / 19:06:21 / cg"
!
addAll:aCollection beforeIndex:index
@@ -559,5 +542,5 @@
!List class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/List.st,v 1.29 2007-11-21 17:24:03 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/List.st,v 1.30 2008-01-18 19:40:51 stefan Exp $'
! !