lib/polyphony/extensions/io.rb in polyphony-0.83 vs lib/polyphony/extensions/io.rb in polyphony-0.84

- old
+ new

@@ -79,10 +79,16 @@ end def splice_to_eof(src, dest, chunk_size = 8192) Polyphony.backend_splice_to_eof(src, dest, chunk_size) end + + if RUBY_PLATFORM =~ /linux/ + def tee(src, dest, maxlen) + Polyphony.backend_tee(src, dest, maxlen) + end + end end end # IO instance method patches class ::IO @@ -269,7 +275,11 @@ Polyphony.backend_splice(src, self, maxlen) end def splice_to_eof_from(src, chunksize = 8192) Polyphony.backend_splice_to_eof(src, self, chunksize) + end + + def tee_from(src, maxlen) + Polyphony.backend_tee(src, self, maxlen) end end