diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-04-08 15:26:23 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-04-08 15:26:23 +0000 |
commit | e8f9c640937df828cec892834c1197e922669bd8 (patch) | |
tree | 1b1b1d2ecbeaface57f4af7fabf9de256003bcc4 /src | |
parent | 46669b8f044c209ace6b097569b661fadc672fe6 (diff) | |
download | scala-e8f9c640937df828cec892834c1197e922669bd8.tar.gz scala-e8f9c640937df828cec892834c1197e922669bd8.tar.bz2 scala-e8f9c640937df828cec892834c1197e922669bd8.zip |
Trunk version of console now uses printf.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Console.scala | 11 |
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. * |