close_read() public

Closes the read 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.

f = IO.popen("/bin/sh","r+")


prog.rb:3:in `readlines': not opened for reading (IOError)
 from prog.rb:3

Calling this method on closed IO object is just ignored since Ruby 2.3.

Show source
Register or log in to add new notes.