I've just started working with Ruby, and I'm getting some odd behavior... I
assume I'm doing something wrong but I'm not sure what.

I'm using Ruby 1.6.2 under windows, and I'm trying to create a Telnet
object.

The code is:

connection = Net::Telnet.new('Host' => 'lex-idsun2.software.com')

I'm getting an intermittent error message -- that's the odd part, the
message only comes up some of the time (maybe 20%)...  Here's the relevant
part of the message from RubyUnit

/cygdrive/c/ruby/lib/ruby/1.6/net/telnet.rb:324:in `open'(Test): Invalid
argument - "connect(2)" (Errno::EINVAL)
	from /cygdrive/c/ruby/lib/ruby/1.6/net/telnet.rb:324:in `initialize'
	from /cygdrive/c/ruby/lib/ruby/1.6/net/telnet.rb:323:in `timeout'
	from /cygdrive/c/ruby/lib/ruby/1.6/net/telnet.rb:323:in `initialize'

Can anybody help me?

Thanks,

Noel