BUG: Incorrect error numbers being reported with TCPSocket

A

Alan Davies

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top