lib/childprocess/jruby/process.rb in childprocess-0.3.5 vs lib/childprocess/jruby/process.rb in childprocess-0.3.6

- old
+ new

@@ -88,9 +88,13 @@ end if duplex? stdin = @process.getOutputStream.to_io stdin.sync = true + stdin.instance_variable_set(:@java_stream, @process.getOutputStream) + def stdin.__flushit; @java_stream.flush; end #The stream provided is a BufferedeOutputStream, so we have to flush it to make the bytes flow to the process + def stdin.flush; super; self.__flushit; end + def stdin.puts(*args); super(*args); self.__flushit; end io._stdin = stdin else @process.getOutputStream.close end