From: ts Date: 2002-01-30T20:04:14+09:00 Subject: Re: popen3 and buffering >>>>> "P" == Paul Brannan writes: P> rb_eval_string( P> "class IO\n" P> " PIPE_BUFFERS = Hash.new\n" P> " def self.pipe_buffer_finalizer(buf)\n" P> " PIPE_BUFFERS[buf] = true\n" P> " return proc { PIPE_BUFFERS.delete(buf) }\n" P> " end\n" P> " def setvbuf(mode, buf=nil)\n" P> " if buf then\n" P> " ObjectSpace.define_finalizer(self, IO.pipe_buffer_finalizer(buf))\n" P> " end\n" P> " c_setvbuf(mode, buf)\n" P> " end\n" What I've not understood is why you want to use a constant (PIPE_BUFFERS) rather than an instance variable ? Guy Decoux