summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-10-05 10:15:25 +0000
committerLex Spoon <lex@lexspoon.org>2007-10-05 10:15:25 +0000
commitbbcd575ed73c45eb3cf2d55b7cc694928ffed22c (patch)
tree32132872c01fc9537dbf370d3432d96ed33e1bc6
parent9d44ea69f88b996254b1398ba1aa182339bab05f (diff)
downloadscala-bbcd575ed73c45eb3cf2d55b7cc694928ffed22c.tar.gz
scala-bbcd575ed73c45eb3cf2d55b7cc694928ffed22c.tar.bz2
scala-bbcd575ed73c45eb3cf2d55b7cc694928ffed22c.zip
fixes two little problems with :replay
1. the "Replaying <some-command>" message gets flushed before <some-command> is replayed 2. the class loaders are more thoroughly flushed, so that recompiled code will take effect better
-rw-r--r--src/compiler/scala/tools/nsc/InterpreterLoop.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
index f1a957f6a0..04be5e9e6a 100644
--- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala
+++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
@@ -185,6 +185,7 @@ class InterpreterLoop(in0: Option[BufferedReader], out: PrintWriter) {
createInterpreter()
for (cmd <- replayCommands) {
out.println("Replaying: " + cmd)
+ out.flush() // because maybe cmd will have its own output
command(cmd)
out.println
}
@@ -276,11 +277,7 @@ class InterpreterLoop(in0: Option[BufferedReader], out: PrintWriter) {
InteractiveReader.createDefault()
}
- uglinessxxx =
- new java.net.URLClassLoader(
- ClassPath.expandPath(settings.classpath.value).
- map(s => new File(s).toURL).toArray,
- classOf[InterpreterLoop].getClassLoader)
+ uglinessxxx = classOf[InterpreterLoop].getClassLoader
createInterpreter()