Oops, merged lost Smalltalk/X compatibility fixes (again)
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 11 May 2015 18:29:13 +0100
changeset 457 76de2febe7d2
parent 456 59a88a51f46a
child 458 a4da1c24d84a
Oops, merged lost Smalltalk/X compatibility fixes (again)
compiler/tests/extras/PPCResources.st
--- a/compiler/tests/extras/PPCResources.st	Mon May 11 12:19:13 2015 +0100
+++ b/compiler/tests/extras/PPCResources.st	Mon May 11 18:29:13 2015 +0100
@@ -54,7 +54,14 @@
 !PPCResources methodsFor:'private utilities'!
 
 files: files withExtension: extension
-    ^ files select: [ :f | f extension = extension ] 
+     ( (Smalltalk respondsTo: #isSmalltalkX) and:[ Smalltalk isSmalltalkX ] ) ifTrue:[ 
+        ^ files select: [ :f | f suffix = extension ] 
+    ] ifFalse:[ 
+        "Assuming Pharo..."   
+        ^ files select: [ :f | f extension = extension ] 
+    ]
+
+    "Modified: / 11-05-2015 / 16:37:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 readDirectory: directory
@@ -91,7 +98,9 @@
     files := self readDirectory: directory.
     files := self files: files withExtension: 'st'.
     
-    ^ files collect: [ :f | (FileStream fileNamed: f) contents ]
+    ^ files collect: [ :f | (FileStream fileNamed: f) contents asString ]
+
+    "Modified: / 11-05-2015 / 16:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 smalltalkObjectMethods