SortedCollection.st
changeset 9920 316e29a48e51
parent 9918 1947f22681ef
child 11268 7ce883e9a42e
--- a/SortedCollection.st	Mon Sep 18 11:05:06 2006 +0200
+++ b/SortedCollection.st	Mon Sep 18 11:05:57 2006 +0200
@@ -270,8 +270,7 @@
     "return the n largest elements"
 
     sortBlock == DefaultSortBlock ifTrue:[
-        ^ ((OrderedCollection new:n) grow:n)
-                replaceFrom:1 with:self startingAt:(self size-n+1)      
+        ^ self copyFrom:(self size-n+1)
     ].
     ^ super largest:n
 
@@ -891,7 +890,7 @@
 !SortedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SortedCollection.st,v 1.61 2006-09-18 09:05:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SortedCollection.st,v 1.62 2006-09-18 09:05:57 cg Exp $'
 ! !
 
 SortedCollection initialize!