ios.close_write â nil
Instance Public methods
Closes the write end of a duplex I/O stream (i.e., one that contains both a
read and a write stream, such as a pipe). Will raise an
IOError
if the stream is not duplexed.
1 2 3 | f = IO .popen( "/bin/sh" , "r+" ) f.close_write f.print "nowhere" |
produces:
1 2 3 | prog.rb: 3 :in `write': not opened for writing (IOError) from prog.rb: 3 :in `print' from prog.rb: 3 |
Please login to continue.