Reported by @mikker:
We're using IO.pipe for chunked POST requests in @elastic's APM Agent and I'm stubbing away rewind on my reader objects because of this.
# HTTP.rb calls #rewind the body stream which IO.pipes don't support
class ModdedIO < IO
def self.pipe(ext_enc = nil)
super(ext_enc).tap do |rw|
rw[0].define_singleton_method(:rewind) { nil }
end
end
end
Just wanted to provide an actual use of IO.pipe.