Quoting matz / ruby-lang.org, on Thu, Jul 20, 2006 at 02:05:26PM +0900:
> |> I feel sympathy for your pain.  But expect.rb highly depends on pty
> |> which is not available on Windows.  It is nearly impossible for us to
> |> implement it without pty.  We need to wait until some Windows expert
> |> would write expect.rb counterpart using Win32 features.  Sorry.
> 
> |How does "regular" expect, which is based on Tcl, work on a Windows 
> |system? I think I've seen it.
> 
> I don't know.  It could be a great hint to implement expect like new
> library that works on Windows.  We hope we see volunteers.

Some info here:

  http://bmrc.berkeley.edu/people/chaffee/expectnt.html

Short answer - lots of windows specific tricks, including setting
debugger-like intercepts in system DLLs!

Sam