autoclose=

io.autoclose = bool â true or false
Instance Public methods

Sets auto-close flag.

f = open("/dev/null")
IO.for_fd(f.fileno)
# ...
f.gets # may cause IOError

f = open("/dev/null")
IO.for_fd(f.fileno).autoclose = true
# ...
f.gets # won't cause IOError
doc_ruby_on_rails
2015-04-13 09:59:09
Comments
Leave a Comment

Please login to continue.