Vince H&K wrote:

>   This has nothing to do with pipes. Ruby is buffering output streams:
> the executed command necessarily flushes its output when it terminates
> but nothing in Ruby guarantees that the buffer in the (Ruby) stream will
> be flushed before the start of the next command.
> 
>   I'll try to make it more clear: the buffering is done within Ruby, so
> the underlying operating system knows nothing about the two lines you
> want to output, and happily just writes what the next executed commands
> writes.
> 
>   Hope this helps,

You're saying the output from "some_executable" is passed directly on to 
the operating systems STDOUT, while what puts prints on stdout is 
buffered by Ruby?

That would explain what is happening. (But why would Ruby introduce 
additional buffering?)

Stephan

> 
>   Vincent


-- 
Posted via http://www.ruby-forum.com/.