See RIO.rio
Source Code
# File rio.rb, line 75 def self.rio(*args,&block) # :yields: self ario = new(*args) if block_given? old_closeoncopy = ario.closeoncopy? begin yield ario.nocloseoncopy ensure ario.reset.closeoncopy(old_closeoncopy) end end ario end
<code/>and<pre/>for code samples.