From: Emil Date: 2007-03-29T17:47:20+09:00 Subject: Newbie question about dynamic class overriding Hi, I have a little problem which I don't think shouldn't be to difficult to solve. I run two different methods. In one of the methods I want to override a class, but not in the other one. I want to do something like this: @auto = WIN32OLE.new("AutoItX3.Control") def sign_with_CA_one @auto.Send("{a}") @auto.Send("{b}") @auto.Send("{1}") @auto.Send("{2}") end def sign_with_CA_two class WIN32OLE alias oldSend(str) Send(str) def Send(str) oldSend(str) sleep 0.1 end end @auto.Send("{a}") @auto.Send("{b}") @auto.Send("{1}") @auto.Send("{2}") end In short: When using one of the methods I want to add a little sleep after each character sendt, but not in the other one. But the code above gives syntax error. Any ideas? Regards Emil -- Posted via http://www.ruby-forum.com/.