Skip to content

Commit

Permalink
Add missing extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Aug 7, 2023
1 parent 8cedce2 commit 84b1e31
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ Class {
#category : #'Buoy-Collections-GS64-Extensions'
}

{ #category : #exceptionselector }
SubscriptOutOfBounds class >> handles: exception [

^ (super handles: exception) or: [ OffsetError handles: exception ]
]

{ #category : #signaling }
SubscriptOutOfBounds class >> signalFor: subscript [
^ self
Expand Down
9 changes: 9 additions & 0 deletions source/Buoy-GS64-Compatibility/OffsetError.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"
OffsetError is an ImproperOperation signaled when an invalid offset
is used to attempt a lookup in GS64.
"
Class {
#name : #OffsetError,
#superclass : #Error,
#category : #'Buoy-GS64-Compatibility-'
}
8 changes: 8 additions & 0 deletions source/Buoy-Math-GS64-Extensions/Integer.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : #Integer }

{ #category : #'*Buoy-Math-GS64-Extensions' }
Integer >> isInteger [
"True for all subclasses of Integer."

^ true
]
6 changes: 6 additions & 0 deletions source/Buoy-Math-GS64-Extensions/Number.extension.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Extension { #name : #Number }

{ #category : #'*Buoy-Math-GS64-Extensions' }
Number >> isInteger [

^ false
]

{ #category : #'*Buoy-Math-GS64-Extensions' }
Number >> isZero [

Expand Down

0 comments on commit 84b1e31

Please sign in to comment.