allow for missing step in literalArrayEncoding
authorMichael Beyl <mb@exept.de>
Tue, 20 Nov 2007 12:53:43 +0100
changeset 10794 b37d77576d77
parent 10793 0475c364e80a
child 10795 3797cbc3fcb4
allow for missing step in literalArrayEncoding
Interval.st
--- a/Interval.st	Mon Nov 19 15:54:43 2007 +0100
+++ b/Interval.st	Tue Nov 20 12:53:43 2007 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ReadOnlySequenceableCollection subclass:#Interval
@@ -190,7 +189,11 @@
 
     start := (encoding at:2).
     stop := (encoding at:3). 
-    step := (encoding at:4).
+    (encoding size > 3) ifTrue:[ 
+        step := (encoding at:4).
+    ] ifFalse:[
+        step := 1.
+    ]
 
     "
      Interval new fromLiteralArrayEncoding:((1 to:10) literalArrayEncoding)  
@@ -554,5 +557,5 @@
 !Interval class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.43 2006-07-03 16:10:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.44 2007-11-20 11:53:43 mb Exp $'
 ! !