Merge jv
authorMerge Script
Wed, 14 Oct 2015 06:59:04 +0200
branchjv
changeset 18822 ed3353058909
parent 18819 767041415d71 (current diff)
parent 18821 9f7004687c73 (diff)
child 18827 6de13b865dbb
Merge
Rectangle.st
SequenceableCollection.st
--- a/Rectangle.st	Mon Oct 12 07:06:31 2015 +0200
+++ b/Rectangle.st	Wed Oct 14 06:59:04 2015 +0200
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Geometric subclass:#Rectangle
 	instanceVariableNames:'left top width height'
 	classVariableNames:''
@@ -286,8 +288,6 @@
     "
 ! !
 
-
-
 !Rectangle methodsFor:'Compatibility-Squeak'!
 
 amountToTranslateWithin: aRectangle
@@ -1779,13 +1779,21 @@
 
     |scalePoint sx sy|
 
+    (scale isMemberOf:SmallInteger) ifTrue:[
+        "/ this is an stc optimization
+        ^ Rectangle left:left * scale
+                     top:top * scale
+                   width:width * scale
+                  height:height * scale
+    ].
+
     scalePoint := scale asPoint.
     sx := scalePoint x.
     sy := scalePoint y.
     ^ Rectangle left:left * sx
-		 top:top * sy
-	       width:(width * sx)
-	      height:(height * sy)
+                 top:top * sy
+               width:width * sx
+              height:height * sy
     "
      (Rectangle origin:10@10 corner:50@50) scaledBy:2   
     "
@@ -1896,10 +1904,10 @@
 !Rectangle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.90 2014-12-21 22:41:28 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.90 2014-12-21 22:41:28 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/SequenceableCollection.st	Mon Oct 12 07:06:31 2015 +0200
+++ b/SequenceableCollection.st	Wed Oct 14 06:59:04 2015 +0200
@@ -401,6 +401,7 @@
 ! !
 
 
+
 !SequenceableCollection methodsFor:'Compatibility-Squeak'!
 
 allButFirst
@@ -3781,11 +3782,12 @@
     |newCollection newSize|
 
     newSize := stopIndex - startIndex + 1.
-    newSize < 0 ifTrue:[
-        newSize := 0
+    newSize <= 0 ifTrue:[
+        ^ self copyEmpty:0.
     ].
     newCollection := self copyEmptyAndGrow:newSize.
     newCollection replaceFrom:1 to:newSize with:self startingAt:startIndex.
+
     ^ newCollection
 
     "
@@ -3794,7 +3796,7 @@
      (1 to:10) copyFrom:2 to:5
 
      '1234567890' copyFrom:2 to:15
-     (1 to:10) copyFrom:12 to:15
+     (1 to:10) copyFrom:12 to:1
     "
 !
 
@@ -4793,6 +4795,8 @@
      #(9 8 7 6 5 4 3 2 1) asSortedCollection upTo:5
      '1234.5678' upTo:$.
      '1234'      upTo:$.
+     '.'      upTo:$.
+
 
      raises an error: