Method: Redisk::IO#close_read
- Defined in:
- lib/redisk/io.rb
#close_read ⇒ Object
ios.close_read => nil 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+")
f.close_read
f.readlines
produces:
prog.rb:3:in `readlines': not opened for reading (IOError)
from prog.rb:3
231 232 233 234 |
# File 'lib/redisk/io.rb', line 231 def close_read @read_open = false nil end |