From: Alan Davies Date: 2003-08-27T00:47:48+09:00 Subject: Re: [BUG] Incorrect TCPSocket errors Sorry, I managed to hit ctrl+enter before I'd finished typing this. I meant to say, I have posted this bug before but no-one replied so I'm hoping someone will pick it up this time. In article , NOSPAMcs96and@yahoo.co.ukNOSPAM says... > Hello > > I'm using ruby 1.8.0 on windows 2000. I've discovered that when > TCPSocket.new raises an exception, the Exception.errno variable contains > the wrong error number, and subsequently, $! contains the wrong error > text. > > e.g. > TCPSocket.new("some.host.com", 80) > > if some.host.com is not listening on port 80, you should receive error > 10061: "No connection could be made because the target machine actively > refused it." This is the error I used to receive with ruby 1.6.7 > > However, with ruby 1.8.0, I get error 61: "The printer queue is full" > This is obviously incorrect. It seems that 10000 has been subtracted > from the error number for some strange reason. > > Cheers, > Alan. >