On Mon, May 10, 2010 at 5:05 PM, Martin Hansen <mail / maasha.dk> wrote:
The basic idea is to intercept system, a very crude first approach is

def reset
  $mysys = []
end
def system *args
  $mysys << %x{#{args.join( " " )}}
end

then you can capture system calls outputs, you might want to add some
code to capture exit values from system calls. I do not know how to do
both out of my head, probably using a rescue cause.

HTH
R.
>
>
> Martin
> --
> Posted via http://www.ruby-forum.com/.
>
>



-- 
The best way to predict the future is to invent it.
-- Alan Kay