Telnet 1.9.1

Hi

In the version of Ruby 1.8.7 this code works as expected

require ‘rubygems’
require ‘net/telnet’
$localhost = Net::Telnet.new(“Host”=>“appfoca04”) {|str| puts str}
$localhost.waitfor(/Connected/ ) { |response| print "Response 4
connection: " + response }

but in 1.9.1 I get the following error:

telnet.rb:5:in <main>': undefined methodwaitfor’ for
#TCPSocket:0x1efa0a0 (NoMethodError)

Installed Gems

activesupport (2.3.9)
builder (3.0.0)
commonwatir (1.7.1)
firewatir (1.7.1)
hoe (2.9.1)
net_dav (0.5.0)
nokogiri (1.4.4.1 x86-mingw32)
rake (0.8.7)
rubygems-update (1.5.2)
s4t-utils (1.0.4)
user-choices (1.1.6.1)
watir (1.7.1)
win32-api (1.4.8 x86-mingw32)
win32-process (0.6.5)
windows-api (0.4.0)
windows-pr (1.1.3)
xml-simple (1.0.14)

Any idea?

Greetings,
Gaspar Brogueira

On 03/01/2011 07:01 AM, Gaspar Brogueira wrote:

Gaspar Brogueira

Try 1.9.2. Worked fine for me there (with a different host, of course).

-Justin

-Justin

Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs