On 16-Apr-2011, "Eric T." <erictetz / gmail.com> wrote:

> This is a bitch to Google ("?" is ignored), but I found someone else
> asking the same question on Stackoverflow, but he got no response
> (http://stackoverflow.com/questions/3450942/ruby-telnet-lib-weird-response).
> You guys could help both of us out. :)

I was able to reproduce your problem in Ruby 1.9.2 but not 1.8.7, against an
MS telnet server instance.  It appears to be some kind of character encoding
problem that prevents certain telnet options from being set to true
(@telnet_options["BINARY"] and @telnet_options["SGA"]).  I haven't tried any
other telnet servers, so it may not manifest itself against every server,
and granted MS Telnet services are known to be pretty bad.  I may look into
it further if I have the time, but you might want to continue your
experiments in 1.8.7 for now.  For anyone else interested in looking at
this, you might look at some of the string.gsub calls in the preprocess
instance method of Net::Telnet, I suspect this might be part of the problem.