Permalink
Browse files

Merging with jruby-1_7

  • Loading branch information...
2 parents 2fca72c + c4aa019 commit f8f16cc725d8cd907261ffa72bb91c4be8282806 @enebo enebo committed Mar 4, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/org/jruby/RubyIO.java
@@ -1396,7 +1396,7 @@ protected int fwrite(RubyString buffer) {
// console() can detect underlying windows codepage so we will just write to it
// and hope it is legible.
- if (Platform.IS_WINDOWS && tty_p(getRuntime().getCurrentContext()).isTrue()) {
+ if (Platform.IS_WINDOWS && tty_p(getRuntime().getCurrentContext()).isTrue() && System.console() != null) {
System.console().printf("%s", buffer.asJavaString());
return len;
}

0 comments on commit f8f16cc

Please sign in to comment.