tests/PPPredicateTest.st
changeset 379 451b5ae38b72
parent 377 6112a403a52d
child 380 8fe3cb4e607f
--- a/tests/PPPredicateTest.st	Fri Oct 03 02:45:16 2014 +0100
+++ b/tests/PPPredicateTest.st	Fri Oct 03 03:11:33 2014 +0100
@@ -297,12 +297,19 @@
 !
 
 parsedCharacterSet: aParser
-	| result |
-	result := WriteStream on: String new.
-	self charactersDo: [ :char |
-		(aParser matches: (String with: char))
-			ifTrue: [ result nextPut: char ] ].
-	^ result contents
+        | result |
+
+        ((Smalltalk respondsTo: #isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[ 
+            result := String new writeStream
+        ] ifFalse:[ 
+            result := WriteStream on: String new.
+        ].
+        self charactersDo: [ :char |
+                (aParser matches: (char asString))
+                        ifTrue: [ result nextPut: char ] ].
+        ^ result contents
+
+    "Modified: / 03-10-2014 / 03:01:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PPPredicateTest class methodsFor:'documentation'!