Oh here it is -- recv_telnet unless `@recvd` is nil or it contains the password prompt or it contains the user string. I'm not super sure that this regex is bound enough, since "user" can be a whole lot of things; what if the user name is already part of the login prompt or something?

In any event, you'll still want to fix your math and provide a test case that demos what the purpose of the variable time out is.