On Wed, 9 Jan 2008 07:00:04 +0900, "Robert Klemme"
<shortcutter / googlemail.com> said:...
> What does #pipe do?  Why don't you use a block for the processing of the 
> data?  For a general (aka library) solution it would also be much better 
>   to pass the IO as an argument, in case there are more pipes to work
>   with.
> 

Yep!  Like a yield statement you mean.  I agree.

As for multiple pipe sources and your question of general usefulness...
(I read somewhere lack of multiple IO is a known issue in UNIX pipes)
I'm just thinking bash, shell scripting.
I don't mean to ignite a language war.
I just think Bash, Ruby, and C make a terrific team.
Also, setting up the pipes seems to be best done from outside,
which makes it best fitted for shell scripting.

Anyways, the missing "?" was a typo.
The following which as I read it should work;

  until $stdin.eof? do
    data = Marshal.load($stdin)  # <= Error here
    pipe( data )
  end

still gives the following error:

   buffer already filled with text-mode content

$stdin.eof? is necessary though, as
a different error is triggered if Marshal tries to load on a EOF.

-Carlos