summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/Console.scala11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/library/scala/Console.scala b/src/library/scala/Console.scala
index fe29150caa..d48a849aef 100644
--- a/src/library/scala/Console.scala
+++ b/src/library/scala/Console.scala
@@ -167,8 +167,8 @@ object Console {
* </p>
* <p>
* The interpretation of the formatting patterns is described in
- * <a href="" target="contentFrame" class="java/text/MessageFormat">
- * <code>java.text.MessageFormat</code></a>.
+ * <a href="" target="contentFrame" class="java/util/Formatter">
+ * <code>java.util.Formatter</code></a>.
* </p>
*
* @param text the pattern for formatting the arguments.
@@ -182,10 +182,9 @@ object Console {
* target="contentFrame">Console.printf</a>.
*/
def format(text: String, args: Any*): Unit =
- out.print(
- if (text eq null) "null"
- else MessageFormat.format(text, textParams(args))
- )
+ if (text eq null) "null" else
+ out.printf(text, args.asInstanceOf[scala.runtime.BoxedObjectArray].
+ unbox(args.getClass).asInstanceOf[Array[Object]])
/** Read a full line from the terminal.
*