Skip to content

Commit

Permalink
Use split: instead of splitOn:
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Sep 15, 2023
1 parent ed6bf52 commit cc02e7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ OperatingSystemInformationProvider >> includeLinuxDetailsOn: details [
linesDo: [ :line |
| labelAndData |

labelAndData := line splitOn: $=.
labelAndData := $= split: line .
labelAndData size = 2
then: [ releaseInfo
at: labelAndData first asLowercase trimBoth
Expand Down
10 changes: 5 additions & 5 deletions source/Stargate-Model/RESTfulControllerAcceptNegotiator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ RESTfulControllerAcceptNegotiator >> precedenceFor: aMediaType [
ifTrue: [ precedence := precedence + 1 ].
version := aMediaType parameterAt: 'version' ifAbsent: [ ^ precedence ].
precedence := precedence + 2.
versionParts := version splitOn: $..
versionParts := $. split: version.
precedence := precedence + versionParts size.
versionParts doWithIndex: [ :part :index | precedence := precedence + (part asInteger * (2 raisedTo: 4 - index)) ].

Expand All @@ -128,13 +128,13 @@ RESTfulControllerAcceptNegotiator >> sortByPrecedence: mediaTypes [
{ #category : #'private - accessing' }
RESTfulControllerAcceptNegotiator >> splitMediaTypesIn: acceptList [

^ ( acceptList splitOn: ',' ) collect: [ :type | type asMediaType ]
^ ( ',' split: acceptList ) collect: [ :type | type asMediaType ]
]

{ #category : #'private - accessing' }
RESTfulControllerAcceptNegotiator >> splitQualifiedLanguageRangesIn: acceptLanguageList [

^ ( acceptLanguageList splitOn: ',' )
^ ( ',' split: acceptLanguageList )
inject: OrderedCollection new
into: [ :qualifiedLanguageRanges :each |
"Be lenient here, ignore everything that is garbage in the header"
Expand All @@ -153,8 +153,8 @@ RESTfulControllerAcceptNegotiator >> versionIn: acceptable canBeHandledBy: avail

acceptVersion := acceptable parameterAt: 'version' ifAbsent: [ ^ true ].
availableVersion := available parameterAt: 'version' ifAbsent: [ ^ false ].
acceptVersionParts := acceptVersion splitOn: $..
availableVersionParts := availableVersion splitOn: $..
acceptVersionParts := $. split: acceptVersion.
availableVersionParts := $. split: availableVersion.
acceptVersionParts
doWithIndex: [ :acceptPart :index |
| availablePart |
Expand Down

0 comments on commit cc02e7e

Please sign in to comment.