#OTHER
authorClaus Gittinger <cg@exept.de>
Thu, 24 Mar 2016 14:27:13 +0100
changeset 3731 abae592de30a
parent 3730 511fb00c40d0
child 3732 afcdb234bf38
child 3734 f4acd1ea5988
#OTHER class: ByteCodeCompiler changed: #compile:forClass:inCategory:notifying:install:skipIfSame:silent:foldConstants:ifFail: care for source being a stream already
ByteCodeCompiler.st
--- a/ByteCodeCompiler.st	Thu Mar 24 01:30:47 2016 +0100
+++ b/ByteCodeCompiler.st	Thu Mar 24 14:27:13 2016 +0100
@@ -3062,7 +3062,11 @@
         ] do:[
             "create a compiler, let it parse and create the parsetree"
 
-            self source:(ReadStream on:sourceCodeString string).
+            sourceCodeString isString ifTrue:[
+                self source:(ReadStream on:sourceCodeString string).
+            ] ifFalse:[
+                self source:sourceCodeString readStream
+            ].    
             self nextToken.
 
             self setClassToCompileFor:aClass.