summaryrefslogtreecommitdiff
path: root/src/library/scala/util/Properties.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/util/Properties.scala')
-rw-r--r--src/library/scala/util/Properties.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala
index 7ea597eac9..a176748cd6 100644
--- a/src/library/scala/util/Properties.scala
+++ b/src/library/scala/util/Properties.scala
@@ -120,7 +120,7 @@ private[scala] trait PropertiesTrait {
/** The default end of line character.
*/
- def lineSeparator = propOrElse("line.separator", "\n")
+ def lineSeparator = System.lineSeparator()
/* Various well-known properties. */
def javaClassPath = propOrEmpty("java.class.path")
@@ -148,6 +148,8 @@ private[scala] trait PropertiesTrait {
// the reason why we don't follow developer.apple.com/library/mac/#technotes/tn2002/tn2110.
/** Returns `true` iff the underlying operating system is a version of Apple Mac OSX. */
def isMac = osName startsWith "Mac OS X"
+ /** Returns `true` iff the underlying operating system is a Linux distribution. */
+ def isLinux = osName startsWith "Linux"
/* Some runtime values. */
private[scala] def isAvian = javaVmName contains "Avian"