Use of STDOUT.flush after puts

R

Robert Dober

IO.popen doesn't require IO#reopen to be available to users, so I'm
not sure what you mean by that. It may do something similar to reopen
under the covers, but that's an implementation detail.
Gives me the opportunity to point out that JRuby1.5 completely
supports open4 now.
That is really great!
Cheers
R.
 
C

Caleb Clausen

That's true, instances which change their class - this is problematic.


IMHO that is a bad idea because this is the standard way how you
redirect stderr, stdin and stdout for child processes - at least on
POSIX systems. Any program that wants to do something similar like
IO.popen or just wants to prevent the child's stdout to clutter its
own output depends on the ability to do this.

I would hate to see reopen go away, but I have to agree with Charlie
that the current implementation has some pretty ugly semantics. It
seems like one ought to be able to get the same effect through
creative use of singleton classes or extend....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top