Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Upgraded to work with scala 2.9.x

  • Loading branch information...
commit d82d971d82ba597b42e1ad0ee272909e6ab289ed 1 parent 3315dd3
Curt Sellmer authored
2  Rakefile
@@ -45,7 +45,7 @@ CLOBBER.include(JAR_FILE, DOC_DIR)
45 45
46 46 directory CLASSES_DIR
47 47
48   -COMPILE_ARGS = "-sourcepath #{SCALA_SRC_DIR} -d #{CLASSES_DIR} #{SCALA_FILES}"
  48 +COMPILE_ARGS = "-deprecation -sourcepath #{SCALA_SRC_DIR} -d #{CLASSES_DIR} #{SCALA_FILES}"
49 49
50 50 desc "Compile scala source files (param can be -reset or -shutdown)."
51 51 task :fsc, [:param] => CLASSES_DIR do |t, args|
BIN  lib/scalatest-1.2.jar
Binary file not shown
BIN  lib/scalatest-1.6.1.jar
Binary file not shown
8 src/main/scala/org/fud/optparse/OptionParser.scala
@@ -186,7 +186,7 @@ import collection.mutable.ListBuffer
186 186 * -h, --help Show this message
187 187 * }}}
188 188 * Where did the `-h, --help` entry come from? By default the `-h` switch is added automatically.
189   - * The function associated with it will print the help text to `stdout` and call `exit(0)`.
  189 + * The function associated with it will print the help text to `stdout` and call `sys.exit(0)`.
190 190 * You can define your own help switch by simply defining a switch with either or both of the
191 191 * names `-h`, `--help`. You can also turn off the auto help altogether.
192 192 *
@@ -288,7 +288,7 @@ import collection.mutable.ListBuffer
288 288 * { v: Option[String] => options += 'base -> v.getOrElse("HEAD") }
289 289 * }.parse(args)
290 290 * }
291   - * catch { case e: OptionParserException => println(e.getMessage); exit(1) }
  291 + * catch { case e: OptionParserException => println(e.getMessage); sys.exit(1) }
292 292 *
293 293 * println("Options: " + options)
294 294 * println("Libraries: " + libs.reverse)
@@ -326,7 +326,7 @@ class OptionParser {
326 326 /** Set this to `false` to avoid the automatically added help switch.
327 327 *
328 328 * The action for the added help switch is to print the help text to `stdout` and then
329   - * call `exit(0)`.
  329 + * call `sys.exit(0)`.
330 330 *
331 331 * You can also override the default help switch by adding your own switch with a
332 332 * short name of "-h" or a long name of "--help". */
@@ -347,7 +347,7 @@ class OptionParser {
347 347
348 348 protected def add_auto_help: Unit = {
349 349 if (auto_help && !switches.exists(s => s.names.short == "h" || s.names.long == "--help"))
350   - this.flag("-h", "--help", "Show this message") { () => println(this); exit(0) }
  350 + this.flag("-h", "--help", "Show this message") { () => println(this); sys.exit(0) }
351 351 }
352 352
353 353 /** Set the banner that is displayed as the first line of the help text. */

0 comments on commit d82d971

Please sign in to comment.
Something went wrong with that request. Please try again.