Object.st
changeset 7216 59bfa2ffdcf7
parent 7215 733294e1a8cc
child 7261 f35fc9cee675
--- a/Object.st	Tue Apr 22 11:31:48 2003 +0200
+++ b/Object.st	Tue Apr 22 11:36:34 2003 +0200
@@ -972,10 +972,7 @@
 #   undef int32
 
 %}.
-    index isInteger ifFalse:[
-        ^ self indexNotInteger:index
-    ].
-    ^ self subscriptBoundsError:index
+    ^ self indexNotIntegerOrOutOfBounds:index
 !
 
 basicAt:index put:anObject
@@ -1425,12 +1422,8 @@
             RETURN ( __InstPtr(self)->i_instvars[idx] );
         }
     }
-%}
-.
-    index isInteger ifFalse:[
-        ^ self indexNotInteger:index
-    ].
-    ^ self subscriptBoundsError:index
+%}.
+    ^ self indexNotIntegerOrOutOfBounds:index
 !
 
 instVarAt:index put:value
@@ -1463,12 +1456,8 @@
             RETURN ( value );
         }
     }
-%}
-.
-    index isInteger ifFalse:[
-        ^ self indexNotInteger:index
-    ].
-    ^ self subscriptBoundsError:index
+%}.
+    ^ self indexNotIntegerOrOutOfBounds:index
 !
 
 instVarNamed:name 
@@ -4095,6 +4084,17 @@
     "Created: / 16.5.1998 / 19:39:41 / cg"
 !
 
+indexNotIntegerOrOutOfBounds:index
+    "{ Pragma: +optSpace }"
+
+    "report an error that index is either non-integral or out of bounds"
+
+    index isInteger ifFalse:[
+        ^ self indexNotInteger:index
+    ].
+    ^ self subscriptBoundsError:index
+!
+
 integerCheckError
     "{ Pragma: +optSpace }"
 
@@ -9080,7 +9080,7 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.462 2003-04-22 09:31:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.463 2003-04-22 09:36:34 cg Exp $'
 ! !
 
 Object initialize!