lib/rio/ops/stream/output.rb in rio-0.3.4 vs lib/rio/ops/stream/output.rb in rio-0.3.6

- old
+ new

@@ -55,14 +55,19 @@ require 'rio/ops/stream/write' include Ops::Stream::Write include Cp::Stream::Output def putrec(rec,*args) self.put_(rec,*args) + self end + def putrec!(rec,*args) + rtn_close { self.put_(rec,*args) } + end + def close_write(&block) - self.ioh.close_write + self.iow.close_write each(&block) if block_given? self end def wclose @@ -79,10 +84,10 @@ yield(*args) wclose end def copyclose() - #p "#{callstr('copyclose')} closeoncopy=#{cx['closeoncopy']} ioh=#{ioh}" + #p "#{callstr('copyclose')} closeoncopy=#{cx['closeoncopy']} iow=#{iow}" #raise RuntimeError,"copclose" if cx['closeoncopy'] wclose else self