# File lib/rio.rb, line 100
100:     def open(m,*args,&block) 
101:       target.open(m,*args)
102:       if block_given?
103:         old_closeoncopy,old_closeoneof = closeoncopy?,closeoneof?
104:         begin
105:           return yield(nocloseoncopy.nocloseoneof)
106:         ensure
107:           reset.closeoncopy(old_closeoncopy).closeoneof(old_closeoneof)
108:         end
109:       end
110:       self 
111:     end