From ebedbef6d186c4cc98c9c4445967af43225230dc Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 28 Mar 2011 22:45:53 +0000 Subject: Made ScalaRunTime.stringOf more general by sepa... Made ScalaRunTime.stringOf more general by separating out the part which formats it for a repl result, and cleaned up some string functions around the repl. No review. --- src/compiler/scala/tools/nsc/interpreter/IMain.scala | 6 +----- .../scala/tools/nsc/interpreter/MemberHandlers.scala | 11 ++++++----- src/library/scala/runtime/ScalaRunTime.scala | 20 +++++++++++--------- 3 files changed, 18 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/interpreter/IMain.scala b/src/compiler/scala/tools/nsc/interpreter/IMain.scala index d74aa5e6df..1a50b87569 100644 --- a/src/compiler/scala/tools/nsc/interpreter/IMain.scala +++ b/src/compiler/scala/tools/nsc/interpreter/IMain.scala @@ -102,11 +102,8 @@ class IMain(val settings: Settings, protected val out: PrintWriter) { private def _initialize(): Boolean = { val source = """ - |// this is assembled to force the loading of approximately the - |// classes which will be loaded on the first expression anyway. |class $repl_$init { - | val x = "abc".reverse.length + (5 max 5) - | scala.runtime.ScalaRunTime.stringOf(x) + | List(1) map (_ + 1) |} |""".stripMargin @@ -497,7 +494,6 @@ class IMain(val settings: Settings, protected val out: PrintWriter) { def compileString(code: String): Boolean = compileSources(new BatchSourceFile("