diff options
-rw-r--r-- | src/library/scala/io/Source.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library/scala/io/Source.scala b/src/library/scala/io/Source.scala index 28be6c3f92..1d362cd285 100644 --- a/src/library/scala/io/Source.scala +++ b/src/library/scala/io/Source.scala @@ -24,6 +24,10 @@ object Source { val DefaultBufSize = 2048 val NoReset: () => Source = () => throw new UnsupportedOperationException() + /** Creates a <code>Source</code> from System.in. + */ + def stdin = fromInputStream(System.in) + def fromIterable(iterable: Iterable[Char]): Source = new Source { def reset() = fromIterable(iterable) val iter = iterable.iterator |