|
37 | 37 | ***** END LICENSE BLOCK *****/ |
38 | 38 | package org.jruby; |
39 | 39 |
|
40 | | -import java.io.InputStream; |
41 | | -import java.io.PrintStream; |
42 | | -import java.io.File; |
43 | | -import java.io.FileDescriptor; |
44 | | - |
45 | | -import java.io.FileInputStream; |
46 | | -import java.io.FileNotFoundException; |
47 | | -import java.io.IOException; |
48 | | -import java.lang.management.ManagementFactory; |
49 | | -import java.lang.management.RuntimeMXBean; |
50 | | -import java.util.ArrayList; |
51 | | -import java.util.List; |
52 | | -import java.util.Map; |
53 | | -import java.util.Properties; |
54 | 40 | import org.jruby.exceptions.MainExitException; |
55 | 41 | import org.jruby.exceptions.RaiseException; |
56 | 42 | import org.jruby.exceptions.ThreadKill; |
|
64 | 50 | import org.jruby.util.log.Logger; |
65 | 51 | import org.jruby.util.log.LoggerFactory; |
66 | 52 |
|
| 53 | +import java.io.File; |
| 54 | +import java.io.FileDescriptor; |
| 55 | +import java.io.FileInputStream; |
| 56 | +import java.io.FileNotFoundException; |
| 57 | +import java.io.IOException; |
| 58 | +import java.io.InputStream; |
| 59 | +import java.io.PrintStream; |
| 60 | +import java.lang.management.ManagementFactory; |
| 61 | +import java.lang.management.RuntimeMXBean; |
| 62 | +import java.util.ArrayList; |
| 63 | +import java.util.List; |
| 64 | +import java.util.Map; |
| 65 | +import java.util.Properties; |
| 66 | + |
67 | 67 | /** |
68 | 68 | * Class used to launch the interpreter. |
69 | 69 | * This is the main class as defined in the jruby.mf manifest. |
@@ -429,14 +429,13 @@ private boolean checkFileSyntax(Ruby runtime, String filename) { |
429 | 429 | } |
430 | 430 |
|
431 | 431 | private boolean checkStreamSyntax(Ruby runtime, InputStream in, String filename) { |
432 | | - PrintStream error = config.getError(); |
433 | 432 | try { |
434 | 433 | runtime.parseFromMain(in, filename); |
435 | | - error.println("Syntax OK for " + filename); |
| 434 | + config.getOutput().println("Syntax OK"); |
436 | 435 | return true; |
437 | 436 | } catch (RaiseException re) { |
438 | 437 | if (re.getException().getMetaClass().getBaseName().equals("SyntaxError")) { |
439 | | - error.println("SyntaxError in " + re.getException().message(runtime.getCurrentContext())); |
| 438 | + config.getError().println("SyntaxError in " + re.getException().message(runtime.getCurrentContext())); |
440 | 439 | } else { |
441 | 440 | throw re; |
442 | 441 | } |
|
0 commit comments