Skip to content

Commit

Permalink
use isKindOf: check to filter for global variables. fixes pharo-proje…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDenker committed Dec 6, 2019
1 parent fb9870f commit 35f3979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
5 changes: 1 addition & 4 deletions src/Athens-Cairo-Tests/CairoUTF8ConverterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ CairoUTF8ConverterTest >> testReusingConverterShouldReplaceOldData [
CairoUTF8ConverterTest >> testUnicodencodingShouldTerminateWithNull [
| buf |
buf := encoder convertChar: $a.


self assert: (buf first:2) equals: #[97 0 ]

self assert: (buf first: 2) equals: #[ 97 0 ]
]
12 changes: 3 additions & 9 deletions src/GeneralRules/RBGlobalVariablesUsage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@ RBGlobalVariablesUsage class >> checksMethod [

{ #category : #running }
RBGlobalVariablesUsage >> basicCheck: aMethod [
^ (aMethod literals
select: [ :l |
l isSymbol not
and: [ l isString not
and: [ l isNumber not
and: [ l isArray not
and: [ l isCharacter not
and: [ l isGlobalVariable ] ] ] ] ] ])
anySatisfy: [ :v | v value isClass not ]
^ (aMethod literals
select: [ :l | l isKindOf: GlobalVariable ])
anySatisfy: [ :v | v value isClass not ]
]

{ #category : #running }
Expand Down

0 comments on commit 35f3979

Please sign in to comment.