Greetings,
  I'm a newbie at Ruby.  I think there might be a bug in Net::Telnet from 
ruby 1.8.1.  

#ruby --version
ruby 1.8.1 (2003-12-25) [sparc-solaris2.8]


Looking at the output from Dump_log, sometimes the remote device will send telnet control sequence follow by some output

e.g.
< 0x00000: ff fe 1f ff  fe 18 ff fa  18 01 ff f0  61 64 6d  ...

Then it works as expected, but sometimes I only get

ff fe 1f ff  fe 18 ff fa  18 01 ff f0

And in that scenario, I think waitfor and preprocess methods don't work correctly.

In waitfor, this seems to match

elsif pt = c.rindex(/#{IAC}[^#{IAC}#{AO}#{AYT}#{DM}#{IP}#{NOP}]?\z/n
o)
              buf = preprocess(c[0 ... pt])
              rest = c[pt .. -1]

so we send only a partial telnet sub-option to preprocess
ff fe 1f ff  fe 18 ff fa  18 01

and it looks like some telnet control character will be send back to the caller of waitfor.

I'm not sure that is the expected behavior, but since when the remote device send extra output with the same control sequence, I get different results...  I think it is not the intended behavior.

Can someone help me out and tell me the best way to 'fix it'  (I'm a newbie!!)

Thanks,
Dany