From 5d782f24fcb339dfeb9250c329e99ad11983f89d Mon Sep 17 00:00:00 2001 From: Szabolcs Berecz Date: Fri, 20 Jan 2012 00:16:14 +0100 Subject: Closes SI-5066 readLine("%s", "prompt") printed "WrappedArray(prompt)" readLine("%s%s", "pro", "mpt") threw a MissingFormatArgumentException --- src/library/scala/Predef.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index b175fb9e1d..824e048e73 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -269,7 +269,7 @@ object Predef extends LowPriorityImplicits { def printf(text: String, xs: Any*) = Console.print(text.format(xs: _*)) def readLine(): String = Console.readLine() - def readLine(text: String, args: Any*) = Console.readLine(text, args) + def readLine(text: String, args: Any*) = Console.readLine(text, args: _*) def readBoolean() = Console.readBoolean() def readByte() = Console.readByte() def readShort() = Console.readShort() -- cgit v1.2.3 From c1b20310728646f7c92bfa54726951b569cfebd3 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Fri, 20 Jan 2012 23:27:42 +0100 Subject: Fixed windows bat file exit code and command chaining (finally) The problem was, that executing the following command in the windows shell, always executed scala.bat regardless of the outcome of scalac.bat: scalac.bat somefile.scala && scala.bat Test Apparently exit codes are broken for windows bat files. Implementing the workaround suggested at http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfu fixed the problem. Tested manually in Windows 7 64. --- src/compiler/scala/tools/ant/templates/tool-windows.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl index 9f1fbc4524..5949689b24 100644 --- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl @@ -86,4 +86,6 @@ goto :eof :end @@endlocal -exit /b %errorlevel% + +REM exit code fix, see http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfu +@@%COMSPEC% /C exit %errorlevel% >nul -- cgit v1.2.3