diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-01 15:10:29 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-01 15:10:29 -0800 |
commit | 947797ea23d711e501605c0cc218fec88e3b97ef (patch) | |
tree | 4c965977bbad2b0f95a9a4b165d836e5814bf9e6 /src | |
parent | 9f39cf8d12a1dbf362ef334bc878ff1c11daac1a (diff) | |
parent | 5ebad784e0714ac50c1f91f7943cdc6dcb51e277 (diff) | |
download | scala-947797ea23d711e501605c0cc218fec88e3b97ef.tar.gz scala-947797ea23d711e501605c0cc218fec88e3b97ef.tar.bz2 scala-947797ea23d711e501605c0cc218fec88e3b97ef.zip |
Merge branch 'develop'
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/SourceFile.scala | 2 | ||||
-rw-r--r-- | src/library/scala/sys/process/package.scala | 3 | ||||
-rw-r--r-- | src/library/scala/util/matching/Regex.scala | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/util/SourceFile.scala b/src/compiler/scala/tools/nsc/util/SourceFile.scala index 22820806be..4405b3457b 100644 --- a/src/compiler/scala/tools/nsc/util/SourceFile.scala +++ b/src/compiler/scala/tools/nsc/util/SourceFile.scala @@ -72,7 +72,7 @@ object ScriptSourceFile { * with "!#" or "::!#". */ def headerLength(cs: Array[Char]): Int = { - val headerPattern = Pattern.compile("""^(::)?!#.*(\r|\n|\r\n)""", Pattern.MULTILINE) + val headerPattern = Pattern.compile("""((?m)^(::)?!#.*|^.*/env .*)(\r|\n|\r\n)""") val headerStarts = List("#!", "::#!") if (headerStarts exists (cs startsWith _)) { diff --git a/src/library/scala/sys/process/package.scala b/src/library/scala/sys/process/package.scala index 17636c4c87..3eb0e5bb89 100644 --- a/src/library/scala/sys/process/package.scala +++ b/src/library/scala/sys/process/package.scala @@ -47,8 +47,9 @@ package scala.sys { * * {{{ * import java.io.File + * import java.net.URL * import scala.sys.process._ - * new File("About.html") #> new File("About_copy.html") ! + * new URL("http://www.scala-lang.org/") #> new File("scala-lang.html") ! * }}} * * One may use a `Process` directly through `ProcessBuilder`'s `run` method, which starts the process in diff --git a/src/library/scala/util/matching/Regex.scala b/src/library/scala/util/matching/Regex.scala index 28ba226324..ca97515e23 100644 --- a/src/library/scala/util/matching/Regex.scala +++ b/src/library/scala/util/matching/Regex.scala @@ -104,7 +104,7 @@ import java.util.regex.{ Pattern, Matcher } * } * }}} * - * The are also methods that can be used to replace the patterns + * There are also methods that can be used to replace the patterns * on a text. The substitutions can be simple replacements, or more * complex functions. For example: * |